diff --git a/.gitignore b/.gitignore index f1ea04e3efb..a6c8c2940d8 100644 --- a/.gitignore +++ b/.gitignore @@ -57,3 +57,4 @@ internal/ !tests/cases/projects/NodeModulesSearch/**/* !tests/baselines/reference/project/nodeModules*/**/* .idea +yarn.lock \ No newline at end of file diff --git a/Gulpfile.ts b/Gulpfile.ts index 7e7f05fd9c4..3d4bae39a32 100644 --- a/Gulpfile.ts +++ b/Gulpfile.ts @@ -21,10 +21,6 @@ declare module "gulp-typescript" { import * as insert from "gulp-insert"; import * as sourcemaps from "gulp-sourcemaps"; import Q = require("q"); -declare global { - // `del` further depends on `Promise` (and is also not included), so we just, patch the global scope's Promise to Q's (which we already include in our deps because gulp depends on it) - type Promise = Q.Promise; -} import del = require("del"); import mkdirP = require("mkdirp"); import minimist = require("minimist"); @@ -394,7 +390,7 @@ gulp.task(builtLocalCompiler, false, [servicesFile], () => { .pipe(localCompilerProject()) .pipe(prependCopyright()) .pipe(sourcemaps.write(".")) - .pipe(gulp.dest(".")); + .pipe(gulp.dest("src/compiler")); }); gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => { @@ -426,7 +422,7 @@ gulp.task(servicesFile, false, ["lib", "generate-diagnostics"], () => { file.path = nodeStandaloneDefinitionsFile; return content.replace(/declare (namespace|module) ts/g, 'declare module "typescript"'); })) - ]).pipe(gulp.dest(".")); + ]).pipe(gulp.dest("src/services")); }); // cancellationToken.js @@ -452,7 +448,7 @@ gulp.task(typingsInstallerJs, false, [servicesFile], () => { .pipe(cancellationTokenProject()) .pipe(prependCopyright()) .pipe(sourcemaps.write(".")) - .pipe(gulp.dest(".")); + .pipe(gulp.dest("src/server/typingsInstaller")); }); const serverFile = path.join(builtLocalDirectory, "tsserver.js"); @@ -465,7 +461,7 @@ gulp.task(serverFile, false, [servicesFile, typingsInstallerJs, cancellationToke .pipe(serverProject()) .pipe(prependCopyright()) .pipe(sourcemaps.write(".")) - .pipe(gulp.dest(".")); + .pipe(gulp.dest("src/server")); }); const tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js"); @@ -560,7 +556,7 @@ gulp.task(run, false, [servicesFile], () => { .pipe(sourcemaps.init()) .pipe(testProject()) .pipe(sourcemaps.write(".", { includeContent: false, sourceRoot: "../../" })) - .pipe(gulp.dest(".")); + .pipe(gulp.dest("src/harness")); }); const internalTests = "internal/"; @@ -782,7 +778,7 @@ gulp.task("browserify", "Runs browserify on run.js to produce a file suitable fo }); })) .pipe(sourcemaps.write(".", { includeContent: false })) - .pipe(gulp.dest(".")); + .pipe(gulp.dest("src/harness")); }); diff --git a/Jakefile.js b/Jakefile.js index 78516f60731..f8be7c2b671 100644 --- a/Jakefile.js +++ b/Jakefile.js @@ -587,7 +587,7 @@ var watchGuardFile = path.join(builtLocalDirectory, "watchGuard.js"); compileFile(watchGuardFile, watchGuardSources, [builtLocalDirectory].concat(watchGuardSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { outDir: builtLocalDirectory, noOutFile: false }); var serverFile = path.join(builtLocalDirectory, "tsserver.js"); -compileFile(serverFile, serverSources, [builtLocalDirectory, copyright, cancellationTokenFile, typingsInstallerFile, watchGuardFile].concat(serverSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], preserveConstEnums: true }); +compileFile(serverFile, serverSources, [builtLocalDirectory, copyright, cancellationTokenFile, typingsInstallerFile, watchGuardFile].concat(serverSources).concat(servicesSources), /*prefixes*/ [copyright], /*useBuiltCompiler*/ true, { types: ["node"], preserveConstEnums: true }); var tsserverLibraryFile = path.join(builtLocalDirectory, "tsserverlibrary.js"); var tsserverLibraryDefinitionFile = path.join(builtLocalDirectory, "tsserverlibrary.d.ts"); compileFile( diff --git a/lib/protocol.d.ts b/lib/protocol.d.ts index 2fc15c3a256..e675ba87417 100644 --- a/lib/protocol.d.ts +++ b/lib/protocol.d.ts @@ -1742,6 +1742,7 @@ declare namespace ts.server.protocol { insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; insertSpaceBeforeFunctionParenthesis?: boolean; diff --git a/src/compiler/binder.ts b/src/compiler/binder.ts index b21b9140a87..909b3d4a786 100644 --- a/src/compiler/binder.ts +++ b/src/compiler/binder.ts @@ -670,6 +670,12 @@ namespace ts { case SyntaxKind.CallExpression: bindCallExpressionFlow(node); break; + case SyntaxKind.JSDocComment: + bindJSDocComment(node); + break; + case SyntaxKind.JSDocTypedefTag: + bindJSDocTypedefTag(node); + break; default: bindEachChild(node); break; @@ -1335,6 +1341,26 @@ namespace ts { } } + function bindJSDocComment(node: JSDoc) { + forEachChild(node, n => { + if (n.kind !== SyntaxKind.JSDocTypedefTag) { + bind(n); + } + }); + } + + function bindJSDocTypedefTag(node: JSDocTypedefTag) { + forEachChild(node, n => { + // if the node has a fullName "A.B.C", that means symbol "C" was already bound + // when we visit "fullName"; so when we visit the name "C" as the next child of + // the jsDocTypedefTag, we should skip binding it. + if (node.fullName && n === node.name && node.fullName.kind !== SyntaxKind.Identifier) { + return; + } + bind(n); + }); + } + function bindCallExpressionFlow(node: CallExpression) { // If the target of the call expression is a function expression or arrow function we have // an immediately invoked function expression (IIFE). Initialize the flowNode property to @@ -1874,6 +1900,18 @@ namespace ts { } node.parent = parent; const saveInStrictMode = inStrictMode; + + // Even though in the AST the jsdoc @typedef node belongs to the current node, + // its symbol might be in the same scope with the current node's symbol. Consider: + // + // /** @typedef {string | number} MyType */ + // function foo(); + // + // Here the current node is "foo", which is a container, but the scope of "MyType" should + // not be inside "foo". Therefore we always bind @typedef before bind the parent node, + // and skip binding this tag later when binding all the other jsdoc tags. + bindJSDocTypedefTagIfAny(node); + // First we bind declaration nodes to a symbol if possible. We'll both create a symbol // and then potentially add the symbol to an appropriate symbol table. Possible // destination symbol tables are: @@ -1908,6 +1946,27 @@ namespace ts { inStrictMode = saveInStrictMode; } + function bindJSDocTypedefTagIfAny(node: Node) { + if (!node.jsDoc) { + return; + } + + for (const jsDoc of node.jsDoc) { + if (!jsDoc.tags) { + continue; + } + + for (const tag of jsDoc.tags) { + if (tag.kind === SyntaxKind.JSDocTypedefTag) { + const savedParent = parent; + parent = jsDoc; + bind(tag); + parent = savedParent; + } + } + } + } + function updateStrictModeStatementList(statements: NodeArray) { if (!inStrictMode) { for (const statement of statements) { diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 00b93021d4f..85ac8ab30dc 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -197,6 +197,8 @@ namespace ts { const evolvingArrayTypes: EvolvingArrayType[] = []; const unknownSymbol = createSymbol(SymbolFlags.Property, "unknown"); + const untypedModuleSymbol = createSymbol(SymbolFlags.ValueModule, ""); + untypedModuleSymbol.exports = createMap(); const resolvingSymbol = createSymbol(0, "__resolving__"); const anyType = createIntrinsicType(TypeFlags.Any, "any"); @@ -1233,7 +1235,7 @@ namespace ts { if (moduleSymbol) { let exportDefaultSymbol: Symbol; - if (isShorthandAmbientModuleSymbol(moduleSymbol)) { + if (isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) { exportDefaultSymbol = moduleSymbol; } else { @@ -1313,7 +1315,7 @@ namespace ts { if (targetSymbol) { const name = specifier.propertyName || specifier.name; if (name.text) { - if (isShorthandAmbientModuleSymbol(moduleSymbol)) { + if (isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) { return moduleSymbol; } @@ -1566,15 +1568,19 @@ namespace ts { if (isForAugmentation) { const diag = Diagnostics.Invalid_module_name_in_augmentation_Module_0_resolves_to_an_untyped_module_at_1_which_cannot_be_augmented; error(errorNode, diag, moduleReference, resolvedModule.resolvedFileName); + return undefined; } else if (compilerOptions.noImplicitAny && moduleNotFoundError) { error(errorNode, Diagnostics.Could_not_find_a_declaration_file_for_module_0_1_implicitly_has_an_any_type, moduleReference, resolvedModule.resolvedFileName); + return undefined; } - // Failed imports and untyped modules are both treated in an untyped manner; only difference is whether we give a diagnostic first. - return undefined; + // Unlike a failed import, an untyped module produces a dummy symbol. + // This is checked for by `isUntypedOrShorthandAmbientModuleSymbol`. + // This must be different than `unknownSymbol` because `getBaseConstructorTypeOfClass` won't fail for `unknownSymbol`. + return untypedModuleSymbol; } if (moduleNotFoundError) { @@ -3759,7 +3765,7 @@ namespace ts { function getTypeOfFuncClassEnumModule(symbol: Symbol): Type { const links = getSymbolLinks(symbol); if (!links.type) { - if (symbol.flags & SymbolFlags.Module && isShorthandAmbientModuleSymbol(symbol)) { + if (symbol.flags & SymbolFlags.Module && isUntypedOrShorthandAmbientModuleSymbol(symbol)) { links.type = anyType; } else { @@ -3958,7 +3964,7 @@ namespace ts { } if (type.flags & TypeFlags.TypeVariable) { const constraint = getBaseConstraintOfType(type); - return isValidBaseType(constraint) && isMixinConstructorType(constraint); + return constraint && isValidBaseType(constraint) && isMixinConstructorType(constraint); } return false; } @@ -5903,15 +5909,52 @@ namespace ts { return getTypeFromNonGenericTypeReference(node, symbol); } + function getPrimitiveTypeFromJSDocTypeReference(node: JSDocTypeReference): Type { + if (isIdentifier(node.name)) { + switch (node.name.text) { + case "String": + return stringType; + case "Number": + return numberType; + case "Boolean": + return booleanType; + case "Void": + return voidType; + case "Undefined": + return undefinedType; + case "Null": + return nullType; + case "Object": + return anyType; + case "Function": + return anyFunctionType; + case "Array": + case "array": + return !node.typeArguments || !node.typeArguments.length ? createArrayType(anyType) : undefined; + case "Promise": + case "promise": + return !node.typeArguments || !node.typeArguments.length ? createPromiseType(anyType) : undefined; + } + } + } + + function getTypeFromJSDocNullableTypeNode(node: JSDocNullableType) { + const type = getTypeFromTypeNode(node.type); + return strictNullChecks ? getUnionType([type, nullType]) : type; + } + function getTypeFromTypeReference(node: TypeReferenceNode | ExpressionWithTypeArguments | JSDocTypeReference): Type { const links = getNodeLinks(node); if (!links.resolvedType) { let symbol: Symbol; let type: Type; if (node.kind === SyntaxKind.JSDocTypeReference) { - const typeReferenceName = getTypeReferenceName(node); - symbol = resolveTypeReferenceName(typeReferenceName); - type = getTypeReferenceType(node, symbol); + type = getPrimitiveTypeFromJSDocTypeReference(node); + if (!type) { + const typeReferenceName = getTypeReferenceName(node); + symbol = resolveTypeReferenceName(typeReferenceName); + type = getTypeReferenceType(node, symbol); + } } else { // We only support expressions that are simple qualified names. For other expressions this produces undefined. @@ -6818,12 +6861,6 @@ namespace ts { return neverType; case SyntaxKind.ObjectKeyword: return nonPrimitiveType; - case SyntaxKind.JSDocNullKeyword: - return nullType; - case SyntaxKind.JSDocUndefinedKeyword: - return undefinedType; - case SyntaxKind.JSDocNeverKeyword: - return neverType; case SyntaxKind.ThisType: case SyntaxKind.ThisKeyword: return getTypeFromThisTypeNode(node); @@ -6850,8 +6887,9 @@ namespace ts { return getTypeFromUnionTypeNode(node); case SyntaxKind.IntersectionType: return getTypeFromIntersectionTypeNode(node); - case SyntaxKind.ParenthesizedType: case SyntaxKind.JSDocNullableType: + return getTypeFromJSDocNullableTypeNode(node); + case SyntaxKind.ParenthesizedType: case SyntaxKind.JSDocNonNullableType: case SyntaxKind.JSDocConstructorType: case SyntaxKind.JSDocThisType: @@ -11583,7 +11621,7 @@ namespace ts { if (isBindingPattern(declaration.parent)) { const parentDeclaration = declaration.parent.parent; const name = declaration.propertyName || declaration.name; - if (isVariableLike(parentDeclaration) && + if (parentDeclaration.kind !== SyntaxKind.BindingElement && parentDeclaration.type && !isBindingPattern(name)) { const text = getTextOfPropertyName(name); @@ -12791,11 +12829,6 @@ namespace ts { // Props is of type 'any' or unknown return attributesType; } - else if (attributesType.flags & TypeFlags.Union) { - // Props cannot be a union type - error(openingLikeElement.tagName, Diagnostics.JSX_element_attributes_type_0_may_not_be_a_union_type, typeToString(attributesType)); - return anyType; - } else { // Normal case -- add in IntrinsicClassElements and IntrinsicElements let apparentAttributesType = attributesType; @@ -14836,7 +14869,6 @@ namespace ts { function checkMetaProperty(node: MetaProperty) { checkGrammarMetaProperty(node); - Debug.assert(node.keywordToken === SyntaxKind.NewKeyword && node.name.text === "target", "Unrecognized meta-property."); const container = getNewTargetContainer(node); if (!container) { error(node, Diagnostics.Meta_property_0_is_only_allowed_in_the_body_of_a_function_declaration_function_expression_or_constructor, "new.target"); @@ -15965,12 +15997,16 @@ namespace ts { checkAssignmentOperator(rightType); return getRegularTypeOfObjectLiteral(rightType); case SyntaxKind.CommaToken: - if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left)) { + if (!compilerOptions.allowUnreachableCode && isSideEffectFree(left) && !isEvalNode(right)) { error(left, Diagnostics.Left_side_of_comma_operator_is_unused_and_has_no_side_effects); } return rightType; } + function isEvalNode(node: Expression) { + return node.kind === SyntaxKind.Identifier && (node as Identifier).text === "eval"; + } + // Return true if there was no error, false if there was an error. function checkForDisallowedESSymbolOperand(operator: SyntaxKind): boolean { const offendingSymbolOperand = @@ -20966,7 +21002,9 @@ namespace ts { return getSymbolOfNode(entityName.parent); } - if (isInJavaScriptFile(entityName) && entityName.parent.kind === SyntaxKind.PropertyAccessExpression) { + if (isInJavaScriptFile(entityName) && + entityName.parent.kind === SyntaxKind.PropertyAccessExpression && + entityName.parent === (entityName.parent.parent as BinaryExpression).left) { // Check if this is a special property assignment const specialPropertyAssignmentSymbol = getSpecialPropertyAssignmentSymbolFromEntityName(entityName); if (specialPropertyAssignmentSymbol) { @@ -21347,7 +21385,7 @@ namespace ts { function moduleExportsSomeValue(moduleReferenceExpression: Expression): boolean { let moduleSymbol = resolveExternalModuleName(moduleReferenceExpression.parent, moduleReferenceExpression); - if (!moduleSymbol || isShorthandAmbientModuleSymbol(moduleSymbol)) { + if (!moduleSymbol || isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol)) { // If the module is not found or is shorthand, assume that it may export a value. return true; } @@ -23063,7 +23101,7 @@ namespace ts { function checkGrammarMetaProperty(node: MetaProperty) { if (node.keywordToken === SyntaxKind.NewKeyword) { if (node.name.text !== "target") { - return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_0, node.name.text, tokenToString(node.keywordToken), "target"); + return grammarErrorOnNode(node.name, Diagnostics._0_is_not_a_valid_meta_property_for_keyword_1_Did_you_mean_2, node.name.text, tokenToString(node.keywordToken), "target"); } } } diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index db7b02926ab..320625c0239 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -323,7 +323,7 @@ "category": "Error", "code": 1113 }, - "Duplicate label '{0}'": { + "Duplicate label '{0}'.": { "category": "Error", "code": 1114 }, @@ -451,7 +451,7 @@ "category": "Error", "code": 1148 }, - "File name '{0}' differs from already included file name '{1}' only in casing": { + "File name '{0}' differs from already included file name '{1}' only in casing.": { "category": "Error", "code": 1149 }, @@ -459,7 +459,7 @@ "category": "Error", "code": 1150 }, - "'const' declarations must be initialized": { + "'const' declarations must be initialized.": { "category": "Error", "code": 1155 }, @@ -655,11 +655,11 @@ "category": "Error", "code": 1210 }, - "A class declaration without the 'default' modifier must have a name": { + "A class declaration without the 'default' modifier must have a name.": { "category": "Error", "code": 1211 }, - "Identifier expected. '{0}' is a reserved word in strict mode": { + "Identifier expected. '{0}' is a reserved word in strict mode.": { "category": "Error", "code": 1212 }, @@ -1115,7 +1115,7 @@ "category": "Error", "code": 2360 }, - "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter": { + "The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter.": { "category": "Error", "code": 2361 }, @@ -1139,7 +1139,7 @@ "category": "Error", "code": 2366 }, - "Type parameter name cannot be '{0}'": { + "Type parameter name cannot be '{0}'.": { "category": "Error", "code": 2368 }, @@ -1299,7 +1299,7 @@ "category": "Error", "code": 2408 }, - "Return type of constructor signature must be assignable to the instance type of the class": { + "Return type of constructor signature must be assignable to the instance type of the class.": { "category": "Error", "code": 2409 }, @@ -1319,7 +1319,7 @@ "category": "Error", "code": 2413 }, - "Class name cannot be '{0}'": { + "Class name cannot be '{0}'.": { "category": "Error", "code": 2414 }, @@ -1355,7 +1355,7 @@ "category": "Error", "code": 2426 }, - "Interface name cannot be '{0}'": { + "Interface name cannot be '{0}'.": { "category": "Error", "code": 2427 }, @@ -1367,7 +1367,7 @@ "category": "Error", "code": 2430 }, - "Enum name cannot be '{0}'": { + "Enum name cannot be '{0}'.": { "category": "Error", "code": 2431 }, @@ -1375,11 +1375,11 @@ "category": "Error", "code": 2432 }, - "A namespace declaration cannot be in a different file from a class or function with which it is merged": { + "A namespace declaration cannot be in a different file from a class or function with which it is merged.": { "category": "Error", "code": 2433 }, - "A namespace declaration cannot be located prior to 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.": { "category": "Error", "code": 2434 }, @@ -1391,11 +1391,11 @@ "category": "Error", "code": 2436 }, - "Module '{0}' is hidden by a local declaration with the same name": { + "Module '{0}' is hidden by a local declaration with the same name.": { "category": "Error", "code": 2437 }, - "Import name cannot be '{0}'": { + "Import name cannot be '{0}'.": { "category": "Error", "code": 2438 }, @@ -1403,7 +1403,7 @@ "category": "Error", "code": 2439 }, - "Import declaration conflicts with local declaration of '{0}'": { + "Import declaration conflicts with local declaration of '{0}'.": { "category": "Error", "code": 2440 }, @@ -1463,7 +1463,7 @@ "category": "Error", "code": 2456 }, - "Type alias name cannot be '{0}'": { + "Type alias name cannot be '{0}'.": { "category": "Error", "code": 2457 }, @@ -1483,7 +1483,7 @@ "category": "Error", "code": 2461 }, - "A rest element must be last in a destructuring pattern": { + "A rest element must be last in a destructuring pattern.": { "category": "Error", "code": 2462 }, @@ -1567,7 +1567,7 @@ "category": "Error", "code": 2483 }, - "Export declaration conflicts with exported declaration of '{0}'": { + "Export declaration conflicts with exported declaration of '{0}'.": { "category": "Error", "code": 2484 }, @@ -1591,7 +1591,7 @@ "category": "Error", "code": 2491 }, - "Cannot redeclare identifier '{0}' in catch clause": { + "Cannot redeclare identifier '{0}' in catch clause.": { "category": "Error", "code": 2492 }, @@ -1835,7 +1835,7 @@ "category": "Error", "code": 2602 }, - "Property '{0}' in type '{1}' is not assignable to type '{2}'": { + "Property '{0}' in type '{1}' is not assignable to type '{2}'.": { "category": "Error", "code": 2603 }, @@ -1851,11 +1851,11 @@ "category": "Error", "code": 2606 }, - "JSX element class does not support attributes because it does not have a '{0}' property": { + "JSX element class does not support attributes because it does not have a '{0}' property.": { "category": "Error", "code": 2607 }, - "The global type 'JSX.{0}' may not have more than one property": { + "The global type 'JSX.{0}' may not have more than one property.": { "category": "Error", "code": 2608 }, @@ -1867,7 +1867,7 @@ "category": "Error", "code": 2649 }, - "Cannot emit namespaced JSX elements in React": { + "Cannot emit namespaced JSX elements in React.": { "category": "Error", "code": 2650 }, @@ -1891,11 +1891,11 @@ "category": "Error", "code": 2656 }, - "JSX expressions must have one parent element": { + "JSX expressions must have one parent element.": { "category": "Error", "code": 2657 }, - "Type '{0}' provides no match for the signature '{1}'": { + "Type '{0}' provides no match for the signature '{1}'.": { "category": "Error", "code": 2658 }, @@ -2075,11 +2075,11 @@ "category": "Error", "code": 2702 }, - "The operand of a delete operator must be a property reference": { + "The operand of a delete operator must be a property reference.": { "category": "Error", "code": 2703 }, - "The operand of a delete operator cannot be a read-only property": { + "The operand of a delete operator cannot be a read-only property.": { "category": "Error", "code": 2704 }, @@ -2413,7 +2413,7 @@ "category": "Error", "code": 5011 }, - "Cannot read file '{0}': {1}": { + "Cannot read file '{0}': {1}.": { "category": "Error", "code": 5012 }, @@ -2433,7 +2433,7 @@ "category": "Error", "code": 5024 }, - "Could not write file '{0}': {1}": { + "Could not write file '{0}': {1}.": { "category": "Error", "code": 5033 }, @@ -2469,11 +2469,11 @@ "category": "Error", "code": 5056 }, - "Cannot find a tsconfig.json file at the specified directory: '{0}'": { + "Cannot find a tsconfig.json file at the specified directory: '{0}'.": { "category": "Error", "code": 5057 }, - "The specified path does not exist: '{0}'": { + "The specified path does not exist: '{0}'.": { "category": "Error", "code": 5058 }, @@ -2485,11 +2485,11 @@ "category": "Error", "code": 5060 }, - "Pattern '{0}' can have at most one '*' character": { + "Pattern '{0}' can have at most one '*' character.": { "category": "Error", "code": 5061 }, - "Substitution '{0}' in pattern '{1}' in can have at most one '*' character": { + "Substitution '{0}' in pattern '{1}' in can have at most one '*' character.": { "category": "Error", "code": 5062 }, @@ -2561,11 +2561,11 @@ "category": "Message", "code": 6012 }, - "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'": { + "Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', or 'ESNEXT'.": { "category": "Message", "code": 6015 }, - "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'": { + "Specify module code generation: 'commonjs', 'amd', 'system', 'umd' or 'es2015'.": { "category": "Message", "code": 6016 }, @@ -2577,7 +2577,7 @@ "category": "Message", "code": 6019 }, - "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'": { + "Compile the project given the path to its configuration file, or to a folder with a 'tsconfig.json'.": { "category": "Message", "code": 6020 }, @@ -2657,7 +2657,7 @@ "category": "Error", "code": 6045 }, - "Argument for '{0}' option must be: {1}": { + "Argument for '{0}' option must be: {1}.": { "category": "Error", "code": 6046 }, @@ -2741,7 +2741,7 @@ "category": "Message", "code": 6072 }, - "Stylize errors and messages using color and context. (experimental)": { + "Stylize errors and messages using color and context (experimental).": { "category": "Message", "code": 6073 }, @@ -2769,7 +2769,7 @@ "category": "Message", "code": 6079 }, - "Specify JSX code generation: 'preserve', 'react-native', or 'react'": { + "Specify JSX code generation: 'preserve', 'react-native', or 'react'.": { "category": "Message", "code": 6080 }, @@ -2785,7 +2785,7 @@ "category": "Message", "code": 6083 }, - "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit": { + "Specify the object invoked for createElement and __spread when targeting 'react' JSX emit.": { "category": "Message", "code": 6084 }, @@ -2873,27 +2873,27 @@ "category": "Message", "code": 6105 }, - "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'": { + "'baseUrl' option is set to '{0}', using this value to resolve non-relative module name '{1}'.": { "category": "Message", "code": 6106 }, - "'rootDirs' option is set, using it to resolve relative module name '{0}'": { + "'rootDirs' option is set, using it to resolve relative module name '{0}'.": { "category": "Message", "code": 6107 }, - "Longest matching prefix for '{0}' is '{1}'": { + "Longest matching prefix for '{0}' is '{1}'.": { "category": "Message", "code": 6108 }, - "Loading '{0}' from the root dir '{1}', candidate location '{2}'": { + "Loading '{0}' from the root dir '{1}', candidate location '{2}'.": { "category": "Message", "code": 6109 }, - "Trying other entries in 'rootDirs'": { + "Trying other entries in 'rootDirs'.": { "category": "Message", "code": 6110 }, - "Module resolution using 'rootDirs' has failed": { + "Module resolution using 'rootDirs' has failed.": { "category": "Message", "code": 6111 }, @@ -2933,7 +2933,7 @@ "category": "Message", "code": 6120 }, - "Resolving with primary search path '{0}'": { + "Resolving with primary search path '{0}'.": { "category": "Message", "code": 6121 }, @@ -2949,7 +2949,7 @@ "category": "Message", "code": 6124 }, - "Looking up in 'node_modules' folder, initial location '{0}'": { + "Looking up in 'node_modules' folder, initial location '{0}'.": { "category": "Message", "code": 6125 }, @@ -2969,7 +2969,7 @@ "category": "Error", "code": 6129 }, - "Resolving real path for '{0}', result '{1}'": { + "Resolving real path for '{0}', result '{1}'.": { "category": "Message", "code": 6130 }, @@ -2977,7 +2977,7 @@ "category": "Error", "code": 6131 }, - "File name '{0}' has a '{1}' extension - stripping it": { + "File name '{0}' has a '{1}' extension - stripping it.": { "category": "Message", "code": 6132 }, @@ -2993,7 +2993,7 @@ "category": "Message", "code": 6135 }, - "The maximum dependency depth to search under node_modules and load JavaScript files": { + "The maximum dependency depth to search under node_modules and load JavaScript files.": { "category": "Message", "code": 6136 }, @@ -3009,7 +3009,7 @@ "category": "Error", "code": 6140 }, - "Parse in strict mode and emit \"use strict\" for each source file": { + "Parse in strict mode and emit \"use strict\" for each source file.": { "category": "Message", "code": 6141 }, @@ -3117,7 +3117,7 @@ "category": "Error", "code": 7025 }, - "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists": { + "JSX element implicitly has type 'any' because no interface 'JSX.{0}' exists.": { "category": "Error", "code": 7026 }, @@ -3245,7 +3245,7 @@ "category": "Error", "code": 17004 }, - "A constructor cannot contain a 'super' call when its class extends 'null'": { + "A constructor cannot contain a 'super' call when its class extends 'null'.": { "category": "Error", "code": 17005 }, @@ -3273,7 +3273,7 @@ "category": "Error", "code": 17011 }, - "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{0}'?": { + "'{0}' is not a valid meta-property for keyword '{1}'. Did you mean '{2}'?": { "category": "Error", "code": 17012 }, @@ -3311,7 +3311,7 @@ "category": "Message", "code": 90003 }, - "Remove declaration for: {0}": { + "Remove declaration for: '{0}'.": { "category": "Message", "code": 90004 }, @@ -3327,7 +3327,7 @@ "category": "Message", "code": 90008 }, - "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig": { + "Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig.": { "category": "Error", "code": 90009 }, @@ -3335,23 +3335,23 @@ "category": "Error", "code": 90010 }, - "Import {0} from {1}": { + "Import {0} from {1}.": { "category": "Message", "code": 90013 }, - "Change {0} to {1}": { + "Change {0} to {1}.": { "category": "Message", "code": 90014 }, - "Add {0} to existing import declaration from {1}": { + "Add {0} to existing import declaration from {1}.": { "category": "Message", "code": 90015 }, - "Add declaration for missing property '{0}'": { + "Add declaration for missing property '{0}'.": { "category": "Message", "code": 90016 }, - "Add index signature for missing property '{0}'": { + "Add index signature for missing property '{0}'.": { "category": "Message", "code": 90017 }, diff --git a/src/compiler/emitter.ts b/src/compiler/emitter.ts index 311bd1aa791..5f4d58ff9be 100644 --- a/src/compiler/emitter.ts +++ b/src/compiler/emitter.ts @@ -1761,7 +1761,6 @@ namespace ts { else { pushNameGenerationScope(); write("{"); - increaseIndent(); emitBlockStatements(node); write("}"); popNameGenerationScope(); diff --git a/src/compiler/factory.ts b/src/compiler/factory.ts index 912981ef283..6833a9a63bc 100644 --- a/src/compiler/factory.ts +++ b/src/compiler/factory.ts @@ -1189,7 +1189,7 @@ namespace ts { } export function createModuleBlock(statements: Statement[]) { - const node = createSynthesizedNode(SyntaxKind.CaseBlock); + const node = createSynthesizedNode(SyntaxKind.ModuleBlock); node.statements = createNodeArray(statements); return node; } diff --git a/src/compiler/transformers/generators.ts b/src/compiler/transformers/generators.ts index a4cb1e4f2d4..b8ace514169 100644 --- a/src/compiler/transformers/generators.ts +++ b/src/compiler/transformers/generators.ts @@ -1942,7 +1942,7 @@ namespace ts { } function substituteExpressionIdentifier(node: Identifier) { - if (renamedCatchVariables && renamedCatchVariables.has(node.text)) { + if (!isGeneratedIdentifier(node) && renamedCatchVariables && renamedCatchVariables.has(node.text)) { const original = getOriginalNode(node); if (isIdentifier(original) && original.parent) { const declaration = resolver.getReferencedValueDeclaration(original); @@ -2108,17 +2108,24 @@ namespace ts { function beginCatchBlock(variable: VariableDeclaration): void { Debug.assert(peekBlockKind() === CodeBlockKind.Exception); - const text = (variable.name).text; - const name = declareLocal(text); - - if (!renamedCatchVariables) { - renamedCatchVariables = createMap(); - renamedCatchVariableDeclarations = []; - context.enableSubstitution(SyntaxKind.Identifier); + // generated identifiers should already be unique within a file + let name: Identifier; + if (isGeneratedIdentifier(variable.name)) { + name = variable.name; + hoistVariableDeclaration(variable.name); } + else { + const text = (variable.name).text; + name = declareLocal(text); + if (!renamedCatchVariables) { + renamedCatchVariables = createMap(); + renamedCatchVariableDeclarations = []; + context.enableSubstitution(SyntaxKind.Identifier); + } - renamedCatchVariables.set(text, true); - renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name; + renamedCatchVariables.set(text, true); + renamedCatchVariableDeclarations[getOriginalNodeId(variable)] = name; + } const exception = peekBlock(); Debug.assert(exception.state < ExceptionBlockState.Catch); diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 388ba321081..4c3e69298da 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -382,9 +382,6 @@ JSDocPropertyTag, JSDocTypeLiteral, JSDocLiteralType, - JSDocNullKeyword, - JSDocUndefinedKeyword, - JSDocNeverKeyword, // Synthesized list SyntaxList, @@ -424,9 +421,9 @@ LastBinaryOperator = CaretEqualsToken, FirstNode = QualifiedName, FirstJSDocNode = JSDocTypeExpression, - LastJSDocNode = JSDocNeverKeyword, + LastJSDocNode = JSDocLiteralType, FirstJSDocTagNode = JSDocComment, - LastJSDocTagNode = JSDocNeverKeyword + LastJSDocTagNode = JSDocLiteralType } export const enum NodeFlags { @@ -626,6 +623,7 @@ export interface TypeParameterDeclaration extends Declaration { kind: SyntaxKind.TypeParameter; + parent?: DeclarationWithTypeParameters; name: Identifier; constraint?: TypeNode; default?: TypeNode; @@ -653,7 +651,7 @@ export interface VariableDeclaration extends Declaration { kind: SyntaxKind.VariableDeclaration; - parent?: VariableDeclarationList; + parent?: VariableDeclarationList | CatchClause; name: BindingName; // Declared variable name type?: TypeNode; // Optional type annotation initializer?: Expression; // Optional initializer @@ -661,11 +659,13 @@ export interface VariableDeclarationList extends Node { kind: SyntaxKind.VariableDeclarationList; + parent?: VariableStatement | ForStatement | ForOfStatement | ForInStatement; declarations: NodeArray; } export interface ParameterDeclaration extends Declaration { kind: SyntaxKind.Parameter; + parent?: SignatureDeclaration; dotDotDotToken?: DotDotDotToken; // Present on rest parameter name: BindingName; // Declared parameter name questionToken?: QuestionToken; // Present on optional parameter @@ -675,6 +675,7 @@ export interface BindingElement extends Declaration { kind: SyntaxKind.BindingElement; + parent?: BindingPattern; propertyName?: PropertyName; // Binding property name (in object binding pattern) dotDotDotToken?: DotDotDotToken; // Present on rest element (in object binding pattern) name: BindingName; // Declared binding element name @@ -756,11 +757,13 @@ export interface ObjectBindingPattern extends Node { kind: SyntaxKind.ObjectBindingPattern; + parent?: VariableDeclaration | ParameterDeclaration | BindingElement; elements: NodeArray; } export interface ArrayBindingPattern extends Node { kind: SyntaxKind.ArrayBindingPattern; + parent?: VariableDeclaration | ParameterDeclaration | BindingElement; elements: NodeArray; } @@ -1333,14 +1336,17 @@ export interface TemplateHead extends LiteralLikeNode { kind: SyntaxKind.TemplateHead; + parent?: TemplateExpression; } export interface TemplateMiddle extends LiteralLikeNode { kind: SyntaxKind.TemplateMiddle; + parent?: TemplateSpan; } export interface TemplateTail extends LiteralLikeNode { kind: SyntaxKind.TemplateTail; + parent?: TemplateSpan; } export type TemplateLiteral = TemplateExpression | NoSubstitutionTemplateLiteral; @@ -1355,6 +1361,7 @@ // The template literal must have kind TemplateMiddleLiteral or TemplateTailLiteral. export interface TemplateSpan extends Node { kind: SyntaxKind.TemplateSpan; + parent?: TemplateExpression; expression: Expression; literal: TemplateMiddle | TemplateTail; } @@ -1442,6 +1449,7 @@ export interface ExpressionWithTypeArguments extends TypeNode { kind: SyntaxKind.ExpressionWithTypeArguments; + parent?: HeritageClause; expression: LeftHandSideExpression; typeArguments?: NodeArray; } @@ -1509,6 +1517,7 @@ /// The opening element of a ... JsxElement export interface JsxOpeningElement extends Expression { kind: SyntaxKind.JsxOpeningElement; + parent?: JsxElement; tagName: JsxTagNameExpression; attributes: JsxAttributes; } @@ -1522,6 +1531,7 @@ export interface JsxAttribute extends ObjectLiteralElement { kind: SyntaxKind.JsxAttribute; + parent?: JsxOpeningLikeElement; name: Identifier; /// JSX attribute initializers are optional; is sugar for initializer?: StringLiteral | JsxExpression; @@ -1529,22 +1539,26 @@ export interface JsxSpreadAttribute extends ObjectLiteralElement { kind: SyntaxKind.JsxSpreadAttribute; + parent?: JsxOpeningLikeElement; expression: Expression; } export interface JsxClosingElement extends Node { kind: SyntaxKind.JsxClosingElement; + parent?: JsxElement; tagName: JsxTagNameExpression; } export interface JsxExpression extends Expression { kind: SyntaxKind.JsxExpression; + parent?: JsxElement | JsxAttributeLike; dotDotDotToken?: Token; expression?: Expression; } export interface JsxText extends Node { kind: SyntaxKind.JsxText; + parent?: JsxElement; } export type JsxChild = JsxText | JsxExpression | JsxElement | JsxSelfClosingElement; @@ -1686,17 +1700,20 @@ export interface CaseBlock extends Node { kind: SyntaxKind.CaseBlock; + parent?: SwitchStatement; clauses: NodeArray; } export interface CaseClause extends Node { kind: SyntaxKind.CaseClause; + parent?: CaseBlock; expression: Expression; statements: NodeArray; } export interface DefaultClause extends Node { kind: SyntaxKind.DefaultClause; + parent?: CaseBlock; statements: NodeArray; } @@ -1722,6 +1739,7 @@ export interface CatchClause extends Node { kind: SyntaxKind.CatchClause; + parent?: TryStatement; variableDeclaration: VariableDeclaration; block: Block; } @@ -1765,6 +1783,7 @@ export interface HeritageClause extends Node { kind: SyntaxKind.HeritageClause; + parent?: InterfaceDeclaration | ClassDeclaration | ClassExpression; token: SyntaxKind; types?: NodeArray; } @@ -1778,6 +1797,7 @@ export interface EnumMember extends Declaration { kind: SyntaxKind.EnumMember; + parent?: EnumDeclaration; // This does include ComputedPropertyName, but the parser will give an error // if it parses a ComputedPropertyName in an EnumMember name: PropertyName; @@ -1796,7 +1816,8 @@ export interface ModuleDeclaration extends DeclarationStatement { kind: SyntaxKind.ModuleDeclaration; - name: Identifier | StringLiteral; + parent?: ModuleBody | SourceFile; + name: ModuleName; body?: ModuleBody | JSDocNamespaceDeclaration | Identifier; } @@ -1816,6 +1837,7 @@ export interface ModuleBlock extends Node, Statement { kind: SyntaxKind.ModuleBlock; + parent?: ModuleDeclaration; statements: NodeArray; } @@ -1823,6 +1845,7 @@ export interface ImportEqualsDeclaration extends DeclarationStatement { kind: SyntaxKind.ImportEqualsDeclaration; + parent?: SourceFile | ModuleBlock; name: Identifier; // 'EntityName' for an internal module reference, 'ExternalModuleReference' for an external @@ -1832,6 +1855,7 @@ export interface ExternalModuleReference extends Node { kind: SyntaxKind.ExternalModuleReference; + parent?: ImportEqualsDeclaration; expression?: Expression; } @@ -1841,6 +1865,7 @@ // ImportClause information is shown at its declaration below. export interface ImportDeclaration extends Statement { kind: SyntaxKind.ImportDeclaration; + parent?: SourceFile | ModuleBlock; importClause?: ImportClause; moduleSpecifier: Expression; } @@ -1855,12 +1880,14 @@ // import d, { a, b as x } from "mod" => name = d, namedBinding: NamedImports = { elements: [{ name: a }, { name: x, propertyName: b}]} export interface ImportClause extends Declaration { kind: SyntaxKind.ImportClause; + parent?: ImportDeclaration; name?: Identifier; // Default binding namedBindings?: NamedImportBindings; } export interface NamespaceImport extends Declaration { kind: SyntaxKind.NamespaceImport; + parent?: ImportClause; name: Identifier; } @@ -1872,17 +1899,20 @@ export interface ExportDeclaration extends DeclarationStatement { kind: SyntaxKind.ExportDeclaration; + parent?: SourceFile | ModuleBlock; exportClause?: NamedExports; moduleSpecifier?: Expression; } export interface NamedImports extends Node { kind: SyntaxKind.NamedImports; + parent?: ImportClause; elements: NodeArray; } export interface NamedExports extends Node { kind: SyntaxKind.NamedExports; + parent?: ExportDeclaration; elements: NodeArray; } @@ -1890,12 +1920,14 @@ export interface ImportSpecifier extends Declaration { kind: SyntaxKind.ImportSpecifier; + parent?: NamedImports; propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent) name: Identifier; // Declared name } export interface ExportSpecifier extends Declaration { kind: SyntaxKind.ExportSpecifier; + parent?: NamedExports; propertyName?: Identifier; // Name preceding "as" keyword (or undefined when "as" is absent) name: Identifier; // Declared name } @@ -1904,6 +1936,7 @@ export interface ExportAssignment extends DeclarationStatement { kind: SyntaxKind.ExportAssignment; + parent?: SourceFile; isExportEquals?: boolean; expression: Expression; } diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 0648c917c70..dc95a338c90 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -435,8 +435,8 @@ namespace ts { } /** Given a symbol for a module, checks that it is either an untyped import or a shorthand ambient module. */ - export function isShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean { - return isShorthandAmbientModule(moduleSymbol.valueDeclaration); + export function isUntypedOrShorthandAmbientModuleSymbol(moduleSymbol: Symbol): boolean { + return !moduleSymbol.declarations || isShorthandAmbientModule(moduleSymbol.valueDeclaration); } function isShorthandAmbientModule(node: Node): boolean { @@ -1557,7 +1557,10 @@ namespace ts { } } else { - result.push(...filter((doc as JSDoc).tags, tag => tag.kind === kind)); + const tags = (doc as JSDoc).tags; + if (tags) { + result.push(...filter(tags, tag => tag.kind === kind)); + } } } return result; diff --git a/src/harness/unittests/commandLineParsing.ts b/src/harness/unittests/commandLineParsing.ts index 8e5ed5f3534..61b96d89553 100644 --- a/src/harness/unittests/commandLineParsing.ts +++ b/src/harness/unittests/commandLineParsing.ts @@ -60,7 +60,7 @@ namespace ts { assertParseResult(["--lib", "es5,invalidOption", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -87,7 +87,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'", + messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -113,7 +113,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -139,7 +139,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'", + messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -165,7 +165,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'", + messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -191,7 +191,7 @@ namespace ts { start: undefined, length: undefined, }, { - messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'", + messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -263,7 +263,7 @@ namespace ts { assertParseResult(["--lib", "es5,", "es7", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, @@ -283,7 +283,7 @@ namespace ts { assertParseResult(["--lib", "es5, ", "es7", "0.ts"], { errors: [{ - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", category: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.category, code: ts.Diagnostics.Argument_for_0_option_must_be_Colon_1.code, diff --git a/src/harness/unittests/convertCompilerOptionsFromJson.ts b/src/harness/unittests/convertCompilerOptionsFromJson.ts index 26ca8e26df1..0409ee19e66 100644 --- a/src/harness/unittests/convertCompilerOptionsFromJson.ts +++ b/src/harness/unittests/convertCompilerOptionsFromJson.ts @@ -94,7 +94,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'", + messageText: "Argument for '--jsx' option must be: 'preserve', 'react-native', 'react'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -122,7 +122,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'", + messageText: "Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -150,7 +150,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'", + messageText: "Argument for '--newLine' option must be: 'crlf', 'lf'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -176,7 +176,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'", + messageText: "Argument for '--target' option must be: 'es3', 'es5', 'es6', 'es2015', 'es2016', 'es2017', 'esnext'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -202,7 +202,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'", + messageText: "Argument for '--moduleResolution' option must be: 'node', 'classic'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -233,7 +233,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -264,7 +264,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -295,7 +295,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] @@ -326,7 +326,7 @@ namespace ts { file: undefined, start: 0, length: 0, - messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'", + messageText: "Argument for '--lib' option must be: 'es5', 'es6', 'es2015', 'es7', 'es2016', 'es2017', 'esnext', 'dom', 'dom.iterable', 'webworker', 'scripthost', 'es2015.core', 'es2015.collection', 'es2015.generator', 'es2015.iterable', 'es2015.promise', 'es2015.proxy', 'es2015.reflect', 'es2015.symbol', 'es2015.symbol.wellknown', 'es2016.array.include', 'es2017.object', 'es2017.sharedmemory', 'es2017.string', 'esnext.asynciterable'.", code: Diagnostics.Argument_for_0_option_must_be_Colon_1.code, category: Diagnostics.Argument_for_0_option_must_be_Colon_1.category }] diff --git a/src/server/protocol.ts b/src/server/protocol.ts index c7d27d80d25..d054867cd1c 100644 --- a/src/server/protocol.ts +++ b/src/server/protocol.ts @@ -2218,6 +2218,7 @@ namespace ts.server.protocol { insertSpaceAfterFunctionKeywordForAnonymousFunctions?: boolean; insertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis?: boolean; insertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets?: boolean; + insertSpaceAfterOpeningAndBeforeClosingNonemptyBraces?: boolean; insertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces?: boolean; insertSpaceAfterOpeningAndBeforeClosingJsxExpressionBraces?: boolean; insertSpaceBeforeFunctionParenthesis?: boolean; diff --git a/src/services/breakpoints.ts b/src/services/breakpoints.ts index c751cf3871b..1f6bec41109 100644 --- a/src/services/breakpoints.ts +++ b/src/services/breakpoints.ts @@ -370,8 +370,8 @@ namespace ts.BreakpointResolver { } function textSpanFromVariableDeclaration(variableDeclaration: VariableDeclaration): TextSpan { - const declarations = variableDeclaration.parent.declarations; - if (declarations && declarations[0] === variableDeclaration) { + if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList && + variableDeclaration.parent.declarations[0] === variableDeclaration) { // First declaration - include let keyword return textSpan(findPrecedingToken(variableDeclaration.pos, sourceFile, variableDeclaration.parent), variableDeclaration); } @@ -400,8 +400,8 @@ namespace ts.BreakpointResolver { return textSpanFromVariableDeclaration(variableDeclaration); } - const declarations = variableDeclaration.parent.declarations; - if (declarations && declarations[0] !== variableDeclaration) { + if (variableDeclaration.parent.kind === SyntaxKind.VariableDeclarationList && + variableDeclaration.parent.declarations[0] !== variableDeclaration) { // If we cannot set breakpoint on this declaration, set it on previous one // Because the variable declaration may be binding pattern and // we would like to set breakpoint in last binding element if that's the case, diff --git a/src/services/findAllReferences.ts b/src/services/findAllReferences.ts index 24d7d648272..3dd55eb3590 100644 --- a/src/services/findAllReferences.ts +++ b/src/services/findAllReferences.ts @@ -133,7 +133,7 @@ namespace ts.FindAllReferences { return { symbol }; } - if (ts.isShorthandAmbientModuleSymbol(aliasedSymbol)) { + if (ts.isUntypedOrShorthandAmbientModuleSymbol(aliasedSymbol)) { return { symbol, shorthandModuleSymbol: aliasedSymbol }; } diff --git a/src/services/goToDefinition.ts b/src/services/goToDefinition.ts index 0ac6c9f7812..b732d8a1193 100644 --- a/src/services/goToDefinition.ts +++ b/src/services/goToDefinition.ts @@ -198,7 +198,11 @@ namespace ts.GoToDefinition { return false; } - function tryAddSignature(signatureDeclarations: Declaration[], selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) { + function tryAddSignature(signatureDeclarations: Declaration[] | undefined, selectConstructors: boolean, symbolKind: string, symbolName: string, containerName: string, result: DefinitionInfo[]) { + if (!signatureDeclarations) { + return false; + } + const declarations: Declaration[] = []; let definition: Declaration | undefined; diff --git a/src/services/services.ts b/src/services/services.ts index cba27688abf..b225e6308e7 100644 --- a/src/services/services.ts +++ b/src/services/services.ts @@ -412,7 +412,7 @@ namespace ts { getDeclaration(): SignatureDeclaration { return this.declaration; } - getTypeParameters(): Type[] { + getTypeParameters(): TypeParameter[] { return this.typeParameters; } getParameters(): Symbol[] { diff --git a/src/services/types.ts b/src/services/types.ts index a577fb20aac..9253153c004 100644 --- a/src/services/types.ts +++ b/src/services/types.ts @@ -39,7 +39,7 @@ namespace ts { export interface Signature { getDeclaration(): SignatureDeclaration; - getTypeParameters(): Type[]; + getTypeParameters(): TypeParameter[]; getParameters(): Symbol[]; getReturnType(): Type; getDocumentationComment(): SymbolDisplayPart[]; diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt index 6e65d46b9be..af0c9b14841 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro module X.Y { export module Point { ~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt index 6e65d46b9be..af0c9b14841 100644 --- a/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt +++ b/tests/baselines/reference/ClassAndModuleWithSameNameAndCommonRootES6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== tests/cases/conformance/internalModules/DeclarationMerging/class.ts (0 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): erro module X.Y { export module Point { ~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); } } diff --git a/tests/baselines/reference/ClassDeclaration24.errors.txt b/tests/baselines/reference/ClassDeclaration24.errors.txt index 62d26eb792a..1584fce4b38 100644 --- a/tests/baselines/reference/ClassDeclaration24.errors.txt +++ b/tests/baselines/reference/ClassDeclaration24.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any' +tests/cases/compiler/ClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'. ==== tests/cases/compiler/ClassDeclaration24.ts (1 errors) ==== class any { ~~~ -!!! error TS2414: Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/ES5For-of20.errors.txt b/tests/baselines/reference/ES5For-of20.errors.txt index 772d5143a04..d58aa6c781f 100644 --- a/tests/baselines/reference/ES5For-of20.errors.txt +++ b/tests/baselines/reference/ES5For-of20.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(3,20): error TS2448: Block-scoped variable 'v' used before its declaration. -tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized +tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error TS1155: 'const' declarations must be initialized. ==== tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts (2 errors) ==== @@ -10,6 +10,6 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-of20.ts(4,15): error !!! error TS2448: Block-scoped variable 'v' used before its declaration. const v; ~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. } } \ No newline at end of file diff --git a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt index 4f08e30cd46..20f8e09248a 100644 --- a/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/FunctionAndModuleWithSameNameAndCommonRoot.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(13,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error TS2403: Subsequent variable declarations must have the same type. Variable 'fn' must be of type '() => { x: number; y: number; }', but here has type 'typeof Point'. @@ -14,7 +14,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/test.ts(2,5): error T module A { export module Point { ~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = { x: 0, y: 0 }; } } diff --git a/tests/baselines/reference/InterfaceDeclaration8.errors.txt b/tests/baselines/reference/InterfaceDeclaration8.errors.txt index e916947d2bd..15c06f6dd0d 100644 --- a/tests/baselines/reference/InterfaceDeclaration8.errors.txt +++ b/tests/baselines/reference/InterfaceDeclaration8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string' +tests/cases/compiler/InterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'. ==== tests/cases/compiler/InterfaceDeclaration8.ts (1 errors) ==== interface string { ~~~~~~ -!!! error TS2427: Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt index ca840a719c0..2a464e88268 100644 --- a/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndClassWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module X.Y { export module Point { ~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = new Point(0, 0); } } @@ -27,7 +27,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(1,8): error ==== tests/cases/conformance/internalModules/DeclarationMerging/simple.ts (1 errors) ==== module A { ~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export var Instance = new A(); } diff --git a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt index 963ddf1ef93..5edbaf28f00 100644 --- a/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt +++ b/tests/baselines/reference/ModuleAndFunctionWithSameNameAndCommonRoot.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged -tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/DeclarationMerging/module.ts(2,19): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. +tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/conformance/internalModules/DeclarationMerging/module.ts (1 errors) ==== module A { export module Point { ~~~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var Origin = { x: 0, y: 0 }; } } @@ -24,7 +24,7 @@ tests/cases/conformance/internalModules/DeclarationMerging/simple.ts(3,19): erro export module Point { ~~~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export var Origin = { x: 0, y: 0 }; } diff --git a/tests/baselines/reference/VariableDeclaration11_es6.errors.txt b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt index d1e6ab7c154..8fa0a99ab67 100644 --- a/tests/baselines/reference/VariableDeclaration11_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration11_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2,1): error TS2304: Cannot find name 'let'. @@ -6,6 +6,6 @@ tests/cases/conformance/es6/variableDeclarations/VariableDeclaration11_es6.ts(2, "use strict"; let ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. ~~~ !!! error TS2304: Cannot find name 'let'. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt index 35e0ad2821c..adf56a61f84 100644 --- a/tests/baselines/reference/VariableDeclaration2_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration2_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. ==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration2_es6.ts (1 errors) ==== const a ~ -!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file +!!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt index 33d956ee1e5..ddfd6c5302d 100644 --- a/tests/baselines/reference/VariableDeclaration4_es6.errors.txt +++ b/tests/baselines/reference/VariableDeclaration4_es6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized +tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts(1,7): error TS1155: 'const' declarations must be initialized. ==== tests/cases/conformance/es6/variableDeclarations/VariableDeclaration4_es6.ts (1 errors) ==== const a: number ~ -!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file +!!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/YieldExpression18_es6.errors.txt b/tests/baselines/reference/YieldExpression18_es6.errors.txt index 5dd2807716f..dd4e4839894 100644 --- a/tests/baselines/reference/YieldExpression18_es6.errors.txt +++ b/tests/baselines/reference/YieldExpression18_es6.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode +tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,1): error TS2304: Cannot find name 'yield'. tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,7): error TS2304: Cannot find name 'foo'. @@ -7,7 +7,7 @@ tests/cases/conformance/es6/yieldExpressions/YieldExpression18_es6.ts(2,7): erro "use strict"; yield(foo); ~~~~~ -!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'yield' is a reserved word in strict mode. ~~~~~ !!! error TS2304: Cannot find name 'yield'. ~~~ diff --git a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt index 7a3ff02aa5e..b40365e9b8e 100644 --- a/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt +++ b/tests/baselines/reference/ambientDeclarationsPatterns_tooManyAsterisks.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character +tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts(1,16): error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character. ==== tests/cases/conformance/ambient/ambientDeclarationsPatterns_tooManyAsterisks.ts (1 errors) ==== declare module "too*many*asterisks" { } ~~~~~~~~~~~~~~~~~~~~ -!!! error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character +!!! error TS5061: Pattern 'too*many*asterisks' can have at most one '*' character. \ No newline at end of file diff --git a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt index e070305fdf8..71f272b4268 100644 --- a/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt +++ b/tests/baselines/reference/asiPreventsParsingAsInterface05.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode -tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode +tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(3,5): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. +tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(10,1): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInterface05.ts(11,1): error TS2304: Cannot find name 'I'. @@ -8,7 +8,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInt var interface: number; ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. // 'interface' is a strict mode reserved word, and so it would be permissible // to allow 'interface' and the name of the interface to be on separate lines; @@ -17,7 +17,7 @@ tests/cases/conformance/interfaces/interfaceDeclarations/asiPreventsParsingAsInt interface // This should be the identifier 'interface' ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. I // This should be the identifier 'I' ~ !!! error TS2304: Cannot find name 'I'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt index 8e285d414e5..cdf0ee400de 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures.errors.txt @@ -1,19 +1,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(28,1): error TS2322: Type 'S2' is not assignable to type 'T'. - Type 'S2' provides no match for the signature 'new (x: number): void' + Type 'S2' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(29,1): error TS2322: Type '(x: string) => void' is not assignable to type 'T'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(30,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. - Type '(x: string) => number' provides no match for the signature 'new (x: number): void' + Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(31,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. - Type '(x: string) => string' provides no match for the signature 'new (x: number): void' + Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(32,1): error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'. - Type 'S2' provides no match for the signature 'new (x: number): void' + Type 'S2' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(33,1): error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(34,1): error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => number' provides no match for the signature 'new (x: number): void' + Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts(35,1): error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => string' provides no match for the signature 'new (x: number): void' + Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures.ts (8 errors) ==== @@ -47,33 +47,33 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme t = s2; ~ !!! error TS2322: Type 'S2' is not assignable to type 'T'. -!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'. t = a3; ~ !!! error TS2322: Type '(x: string) => void' is not assignable to type 'T'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. t = (x: string) => 1; ~ !!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'. -!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. t = function (x: string) { return ''; } ~ !!! error TS2322: Type '(x: string) => string' is not assignable to type 'T'. -!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. a = s2; ~ !!! error TS2322: Type 'S2' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type 'S2' provides no match for the signature 'new (x: number): void'. a = a3; ~ !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. a = (x: string) => 1; ~ !!! error TS2322: Type '(x: string) => number' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => number' provides no match for the signature 'new (x: number): void'. a = function (x: string) { return ''; } ~ !!! error TS2322: Type '(x: string) => string' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => string' provides no match for the signature 'new (x: number): void'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt index eacf758d935..0155b8611c4 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures2.errors.txt @@ -9,11 +9,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(34,1): error TS2322: Type 'S2' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(35,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(36,1): error TS2322: Type '(x: string) => number' is not assignable to type 'T'. Property 'f' is missing in type '(x: string) => number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(37,1): error TS2322: Type '(x: string) => string' is not assignable to type 'T'. @@ -21,11 +21,11 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(38,1): error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(39,1): error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'. Types of property 'f' are incompatible. Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. - Type '(x: string) => void' provides no match for the signature 'new (x: number): void' + Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(40,1): error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'. Property 'f' is missing in type '(x: string) => number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures2.ts(41,1): error TS2322: Type '(x: string) => string' is not assignable to type '{ f: new (x: number) => void; }'. @@ -83,13 +83,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'S2' is not assignable to type 'T'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. t = a3; ~ !!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type 'T'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. t = (x: string) => 1; ~ !!! error TS2322: Type '(x: string) => number' is not assignable to type 'T'. @@ -103,13 +103,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'S2' is not assignable to type '{ f: new (x: number) => void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. a = a3; ~ !!! error TS2322: Type '{ f(x: string): void; }' is not assignable to type '{ f: new (x: number) => void; }'. !!! error TS2322: Types of property 'f' are incompatible. !!! error TS2322: Type '(x: string) => void' is not assignable to type 'new (x: number) => void'. -!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void' +!!! error TS2322: Type '(x: string) => void' provides no match for the signature 'new (x: number): void'. a = (x: string) => 1; ~ !!! error TS2322: Type '(x: string) => number' is not assignable to type '{ f: new (x: number) => void; }'. diff --git a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt index 3f8111a3244..f6e93e13f04 100644 --- a/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt +++ b/tests/baselines/reference/assignmentCompatWithConstructSignatures4.errors.txt @@ -15,19 +15,19 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(77,9): error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. - Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any' + Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(78,9): error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. - Type '(a: any) => any' provides no match for the signature 'new (a: number): number' + Type '(a: any) => any' provides no match for the signature 'new (a: number): number'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(81,9): error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. Types of parameters 'x' and 'x' are incompatible. Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. - Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any' + Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any'. tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts(82,9): error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. Types of parameters 'x' and 'x' are incompatible. Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. - Type '(a: any) => any' provides no match for the signature 'new (a: T): T' + Type '(a: any) => any' provides no match for the signature 'new (a: T): T'. ==== tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignmentCompatWithConstructSignatures4.ts (6 errors) ==== @@ -128,13 +128,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: (a: T) => T) => T[]' is not assignable to type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' is not assignable to type '(a: any) => any'. -!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any' +!!! error TS2322: Type '{ new (a: number): number; new (a?: number): number; }' provides no match for the signature '(a: any): any'. b16 = a16; // error ~~~ !!! error TS2322: Type '{ new (x: { new (a: number): number; new (a?: number): number; }): number[]; new (x: { new (a: boolean): boolean; new (a?: boolean): boolean; }): boolean[]; }' is not assignable to type 'new (x: (a: T) => T) => T[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: number): number; new (a?: number): number; }'. -!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number' +!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: number): number'. var b17: new (x: (a: T) => T) => any[]; a17 = b17; // error @@ -142,13 +142,13 @@ tests/cases/conformance/types/typeRelationships/assignmentCompatibility/assignme !!! error TS2322: Type 'new (x: (a: T) => T) => any[]' is not assignable to type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' is not assignable to type '(a: any) => any'. -!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any' +!!! error TS2322: Type '{ new (a: T): T; new (a: T): T; }' provides no match for the signature '(a: any): any'. b17 = a17; // error ~~~ !!! error TS2322: Type '{ new (x: { new (a: T): T; new (a: T): T; }): any[]; new (x: { new (a: T): T; new (a: T): T; }): any[]; }' is not assignable to type 'new (x: (a: T) => T) => any[]'. !!! error TS2322: Types of parameters 'x' and 'x' are incompatible. !!! error TS2322: Type '(a: any) => any' is not assignable to type '{ new (a: T): T; new (a: T): T; }'. -!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: T): T' +!!! error TS2322: Type '(a: any) => any' provides no match for the signature 'new (a: T): T'. } module WithGenericSignaturesInBaseType { diff --git a/tests/baselines/reference/assignmentCompatability24.errors.txt b/tests/baselines/reference/assignmentCompatability24.errors.txt index e49f0803b04..9d200272b31 100644 --- a/tests/baselines/reference/assignmentCompatability24.errors.txt +++ b/tests/baselines/reference/assignmentCompatability24.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. - Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring' + Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. ==== tests/cases/compiler/assignmentCompatability24.ts (1 errors) ==== @@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability24.ts(9,1): error TS2322: Type 'inte __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring' \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability33.errors.txt b/tests/baselines/reference/assignmentCompatability33.errors.txt index 386b3c5e292..a67e0c2ae07 100644 --- a/tests/baselines/reference/assignmentCompatability33.errors.txt +++ b/tests/baselines/reference/assignmentCompatability33.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. - Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring' + Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. ==== tests/cases/compiler/assignmentCompatability33.ts (1 errors) ==== @@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability33.ts(9,1): error TS2322: Type 'inte __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tstring) => Tstring'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring' \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tstring): Tstring'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability34.errors.txt b/tests/baselines/reference/assignmentCompatability34.errors.txt index fa91456b286..1dced22968b 100644 --- a/tests/baselines/reference/assignmentCompatability34.errors.txt +++ b/tests/baselines/reference/assignmentCompatability34.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. - Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber' + Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber'. ==== tests/cases/compiler/assignmentCompatability34.ts (1 errors) ==== @@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability34.ts(9,1): error TS2322: Type 'inte __test2__.__val__obj = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type '(a: Tnumber) => Tnumber'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber' \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature '(a: Tnumber): Tnumber'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability37.errors.txt b/tests/baselines/reference/assignmentCompatability37.errors.txt index 194e216f1ee..b007955968f 100644 --- a/tests/baselines/reference/assignmentCompatability37.errors.txt +++ b/tests/baselines/reference/assignmentCompatability37.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. - Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any' + Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any'. ==== tests/cases/compiler/assignmentCompatability37.ts (1 errors) ==== @@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability37.ts(9,1): error TS2322: Type 'inte __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tnumber) => any'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any' \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tnumber): any'. \ No newline at end of file diff --git a/tests/baselines/reference/assignmentCompatability38.errors.txt b/tests/baselines/reference/assignmentCompatability38.errors.txt index c15e5e31230..9b5aebca8e3 100644 --- a/tests/baselines/reference/assignmentCompatability38.errors.txt +++ b/tests/baselines/reference/assignmentCompatability38.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. - Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any' + Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any'. ==== tests/cases/compiler/assignmentCompatability38.ts (1 errors) ==== @@ -14,4 +14,4 @@ tests/cases/compiler/assignmentCompatability38.ts(9,1): error TS2322: Type 'inte __test2__.__val__aa = __test1__.__val__obj4 ~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type 'interfaceWithPublicAndOptional' is not assignable to type 'new (param: Tstring) => any'. -!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any' \ No newline at end of file +!!! error TS2322: Type 'interfaceWithPublicAndOptional' provides no match for the signature 'new (param: Tstring): any'. \ No newline at end of file diff --git a/tests/baselines/reference/augmentedTypesModules.errors.txt b/tests/baselines/reference/augmentedTypesModules.errors.txt index 5ece0710e43..627df184644 100644 --- a/tests/baselines/reference/augmentedTypesModules.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules.errors.txt @@ -4,9 +4,9 @@ tests/cases/compiler/augmentedTypesModules.ts(8,8): error TS2300: Duplicate iden tests/cases/compiler/augmentedTypesModules.ts(9,5): error TS2300: Duplicate identifier 'm1b'. tests/cases/compiler/augmentedTypesModules.ts(16,8): error TS2300: Duplicate identifier 'm1d'. tests/cases/compiler/augmentedTypesModules.ts(19,5): error TS2300: Duplicate identifier 'm1d'. -tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules.ts(25,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +tests/cases/compiler/augmentedTypesModules.ts(28,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/compiler/augmentedTypesModules.ts (9 errors) ==== @@ -48,12 +48,12 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace d module m2a { var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2b() { }; // error since the module is instantiated // should be errors to have function first @@ -78,7 +78,7 @@ tests/cases/compiler/augmentedTypesModules.ts(51,8): error TS2434: A namespace d module m3a { var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. class m3a { foo() { } } // error, class isn't ambient or declared before the module class m3b { foo() { } } diff --git a/tests/baselines/reference/augmentedTypesModules2.errors.txt b/tests/baselines/reference/augmentedTypesModules2.errors.txt index be847d88830..788e55d805b 100644 --- a/tests/baselines/reference/augmentedTypesModules2.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules2.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged -tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules2.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +tests/cases/compiler/augmentedTypesModules2.ts(8,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. +tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/compiler/augmentedTypesModules2.ts (3 errors) ==== @@ -10,12 +10,12 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace module m2a { var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2a() { }; // error since the module is instantiated module m2b { export var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2b() { }; // error since the module is instantiated function m2c() { }; @@ -23,7 +23,7 @@ tests/cases/compiler/augmentedTypesModules2.ts(14,8): error TS2434: A namespace module m2cc { export var y = 2; } ~~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. function m2cc() { }; // error to have module first module m2d { } diff --git a/tests/baselines/reference/augmentedTypesModules3.errors.txt b/tests/baselines/reference/augmentedTypesModules3.errors.txt index 8e1bd706271..46b27da0bec 100644 --- a/tests/baselines/reference/augmentedTypesModules3.errors.txt +++ b/tests/baselines/reference/augmentedTypesModules3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/compiler/augmentedTypesModules3.ts (1 errors) ==== @@ -8,5 +8,5 @@ tests/cases/compiler/augmentedTypesModules3.ts(5,8): error TS2434: A namespace d module m3a { var y = 2; } ~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. class m3a { foo() { } } // error, class isn't ambient or declared before the module \ No newline at end of file diff --git a/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt b/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt index 4a38371829d..afc9ac40f1e 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es2017_1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts (2 errors) ==== @@ -11,13 +11,13 @@ tests/cases/conformance/async/es2017/await_unaryExpression_es2017_1.ts(11,12): e async function bar1() { delete await 42; // OK ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar2() { delete await 42; // OK ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar3() { diff --git a/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt b/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt index 0f80ec02334..e9966847189 100644 --- a/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es2017_2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts (2 errors) ==== @@ -7,13 +7,13 @@ tests/cases/conformance/async/es2017/await_unaryExpression_es2017_2.ts(7,12): er async function bar1() { delete await 42; ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar2() { delete await 42; ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar3() { diff --git a/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt b/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt index 8212c2dd291..b4f866ff0ec 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es6_1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(7,12): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts (2 errors) ==== @@ -11,13 +11,13 @@ tests/cases/conformance/async/es6/await_unaryExpression_es6_1.ts(11,12): error T async function bar1() { delete await 42; // OK ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar2() { delete await 42; // OK ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar3() { diff --git a/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt b/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt index cde22cc5549..989e96c7d3f 100644 --- a/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt +++ b/tests/baselines/reference/await_unaryExpression_es6_2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(3,12): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts (2 errors) ==== @@ -7,13 +7,13 @@ tests/cases/conformance/async/es6/await_unaryExpression_es6_2.ts(7,12): error TS async function bar1() { delete await 42; ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar2() { delete await 42; ~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } async function bar3() { diff --git a/tests/baselines/reference/baseConstraintOfDecorator.errors.txt b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt new file mode 100644 index 00000000000..efc0c59f9ee --- /dev/null +++ b/tests/baselines/reference/baseConstraintOfDecorator.errors.txt @@ -0,0 +1,23 @@ +tests/cases/compiler/baseConstraintOfDecorator.ts(2,5): error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. +tests/cases/compiler/baseConstraintOfDecorator.ts(2,40): error TS2507: Type 'TFunction' is not a constructor function type. + + +==== tests/cases/compiler/baseConstraintOfDecorator.ts (2 errors) ==== + export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { + return class decoratorFunc extends superClass { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + ~~~~~~~~~~ +!!! error TS2507: Type 'TFunction' is not a constructor function type. + constructor(...args: any[]) { + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + super(...args); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~ + _instanceModifier(this, args); + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + } + ~~~~~~~~~ + }; + ~~~~~~ +!!! error TS2322: Type 'typeof decoratorFunc' is not assignable to type 'TFunction'. + } + \ No newline at end of file diff --git a/tests/baselines/reference/baseConstraintOfDecorator.js b/tests/baselines/reference/baseConstraintOfDecorator.js new file mode 100644 index 00000000000..0bceaca2509 --- /dev/null +++ b/tests/baselines/reference/baseConstraintOfDecorator.js @@ -0,0 +1,40 @@ +//// [baseConstraintOfDecorator.ts] +export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { + return class decoratorFunc extends superClass { + constructor(...args: any[]) { + super(...args); + _instanceModifier(this, args); + } + }; +} + + +//// [baseConstraintOfDecorator.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +function classExtender(superClass, _instanceModifier) { + return (function (_super) { + __extends(decoratorFunc, _super); + function decoratorFunc() { + var args = []; + for (var _i = 0; _i < arguments.length; _i++) { + args[_i] = arguments[_i]; + } + var _this = _super.apply(this, args) || this; + _instanceModifier(_this, args); + return _this; + } + return decoratorFunc; + }(superClass)); +} +exports.classExtender = classExtender; diff --git a/tests/baselines/reference/cachedModuleResolution1.trace.json b/tests/baselines/reference/cachedModuleResolution1.trace.json index ba59e8df8e8..c9f40c56796 100644 --- a/tests/baselines/reference/cachedModuleResolution1.trace.json +++ b/tests/baselines/reference/cachedModuleResolution1.trace.json @@ -8,12 +8,12 @@ "File '/a/b/node_modules/foo.ts' does not exist.", "File '/a/b/node_modules/foo.tsx' does not exist.", "File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", "======== Resolving module 'foo' from '/a/b/c/lib.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.", "Resolution for module 'foo' was found in cache.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution2.trace.json b/tests/baselines/reference/cachedModuleResolution2.trace.json index eb18792122a..a7fc2414f03 100644 --- a/tests/baselines/reference/cachedModuleResolution2.trace.json +++ b/tests/baselines/reference/cachedModuleResolution2.trace.json @@ -6,7 +6,7 @@ "File '/a/b/node_modules/foo.ts' does not exist.", "File '/a/b/node_modules/foo.tsx' does not exist.", "File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", "======== Resolving module 'foo' from '/a/b/c/d/e/app.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", @@ -14,6 +14,6 @@ "Directory '/a/b/c/d/e/node_modules' does not exist, skipping all lookups in it.", "Directory '/a/b/c/d/node_modules' does not exist, skipping all lookups in it.", "Resolution for module 'foo' was found in cache.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/cachedModuleResolution5.trace.json b/tests/baselines/reference/cachedModuleResolution5.trace.json index f489afffbe9..b09cc7a35be 100644 --- a/tests/baselines/reference/cachedModuleResolution5.trace.json +++ b/tests/baselines/reference/cachedModuleResolution5.trace.json @@ -8,12 +8,12 @@ "File '/a/b/node_modules/foo.ts' does not exist.", "File '/a/b/node_modules/foo.tsx' does not exist.", "File '/a/b/node_modules/foo.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========", "======== Resolving module 'foo' from '/a/b/lib.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", "Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.", "Resolution for module 'foo' was found in cache.", - "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'", + "Resolving real path for '/a/b/node_modules/foo.d.ts', result '/a/b/node_modules/foo.d.ts'.", "======== Module name 'foo' was successfully resolved to '/a/b/node_modules/foo.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/callConstructAssignment.errors.txt b/tests/baselines/reference/callConstructAssignment.errors.txt index fc36e472151..62a529daeb1 100644 --- a/tests/baselines/reference/callConstructAssignment.errors.txt +++ b/tests/baselines/reference/callConstructAssignment.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/callConstructAssignment.ts(7,1): error TS2322: Type 'new () => any' is not assignable to type '() => void'. - Type 'new () => any' provides no match for the signature '(): void' + Type 'new () => any' provides no match for the signature '(): void'. tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2322: Type '() => void' is not assignable to type 'new () => any'. - Type '() => void' provides no match for the signature 'new (): any' + Type '() => void' provides no match for the signature 'new (): any'. ==== tests/cases/compiler/callConstructAssignment.ts (2 errors) ==== @@ -14,8 +14,8 @@ tests/cases/compiler/callConstructAssignment.ts(8,1): error TS2322: Type '() => foo = bar; // error ~~~ !!! error TS2322: Type 'new () => any' is not assignable to type '() => void'. -!!! error TS2322: Type 'new () => any' provides no match for the signature '(): void' +!!! error TS2322: Type 'new () => any' provides no match for the signature '(): void'. bar = foo; // error ~~~ !!! error TS2322: Type '() => void' is not assignable to type 'new () => any'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any' \ No newline at end of file +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): any'. \ No newline at end of file diff --git a/tests/baselines/reference/classExtendsNull.errors.txt b/tests/baselines/reference/classExtendsNull.errors.txt index 905c90c42fd..7fcd5d8f2a9 100644 --- a/tests/baselines/reference/classExtendsNull.errors.txt +++ b/tests/baselines/reference/classExtendsNull.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' +tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. ==== tests/cases/compiler/classExtendsNull.ts (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/compiler/classExtendsNull.ts(3,9): error TS17005: A constructor cann constructor() { super(); ~~~~~~~ -!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' +!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. return Object.create(null); } } diff --git a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt index a0dfb5d62c1..e2bada55be8 100644 --- a/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/classWithPredefinedTypesAsNames.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(3,7): error TS2414: Class name cannot be 'any' -tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(4,7): error TS2414: Class name cannot be 'number' -tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(5,7): error TS2414: Class name cannot be 'boolean' -tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(6,7): error TS2414: Class name cannot be 'string' +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(3,7): error TS2414: Class name cannot be 'any'. +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(4,7): error TS2414: Class name cannot be 'number'. +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(5,7): error TS2414: Class name cannot be 'boolean'. +tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts(6,7): error TS2414: Class name cannot be 'string'. ==== tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsNames.ts (4 errors) ==== @@ -9,13 +9,13 @@ tests/cases/conformance/classes/classDeclarations/classWithPredefinedTypesAsName class any { } ~~~ -!!! error TS2414: Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any'. class number { } ~~~~~~ -!!! error TS2414: Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number'. class boolean { } ~~~~~~~ -!!! error TS2414: Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean'. class string { } ~~~~~~ -!!! error TS2414: Class name cannot be 'string' \ No newline at end of file +!!! error TS2414: Class name cannot be 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt index 2de3141da54..699d133d7ac 100644 --- a/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/cloduleSplitAcrossFiles.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== tests/cases/compiler/cloduleSplitAcrossFiles_class.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/cloduleSplitAcrossFiles_module.ts(1,8): error TS2433: A nam ==== tests/cases/compiler/cloduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt b/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt index 0f23d5c9a15..c3160562a17 100644 --- a/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt +++ b/tests/baselines/reference/cloduleWithPriorInstantiatedModule.errors.txt @@ -1,11 +1,11 @@ -tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts(2,8): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. ==== tests/cases/compiler/cloduleWithPriorInstantiatedModule.ts (1 errors) ==== // Non-ambient & instantiated module. module Moclodule { ~~~~~~~~~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export interface Someinterface { foo(): void; } diff --git a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline index f8b479e6d7b..e01194874bf 100644 --- a/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline +++ b/tests/baselines/reference/compileOnSaveWorksWhenEmitBlockingErrorOnOtherFile.baseline @@ -1,7 +1,7 @@ EmitSkipped: true Diagnostics: Cannot write file '/tests/cases/fourslash/b.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. EmitSkipped: false FileName : /tests/cases/fourslash/a.js diff --git a/tests/baselines/reference/computedPropertyNames3_ES5.errors.txt b/tests/baselines/reference/computedPropertyNames3_ES5.errors.txt index 4c54e9ad61f..7caab39885e 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES5.errors.txt +++ b/tests/baselines/reference/computedPropertyNames3_ES5.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(4,1 tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2378: A 'get' accessor must return a value. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode. -tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(5,17): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2378: A 'get' accessor must return a value. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -23,7 +23,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES5.ts(7,1 ~~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. ~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. set [[0, 1]](v) { } ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt b/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt index 9b7221563c2..9db937313e3 100644 --- a/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt +++ b/tests/baselines/reference/computedPropertyNames3_ES6.errors.txt @@ -2,7 +2,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(4,1 tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2378: A 'get' accessor must return a value. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS1102: 'delete' cannot be called on an identifier in strict mode. -tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(5,17): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(6,9): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2378: A 'get' accessor must return a value. tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,16): error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. @@ -23,7 +23,7 @@ tests/cases/conformance/es6/computedProperties/computedPropertyNames3_ES6.ts(7,1 ~~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. ~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. set [[0, 1]](v) { } ~~~~~~~~ !!! error TS2464: A computed property name must be of type 'string', 'number', 'symbol', or 'any'. diff --git a/tests/baselines/reference/constDeclarations-errors.errors.txt b/tests/baselines/reference/constDeclarations-errors.errors.txt index 83031e0aa79..14a3de1bf81 100644 --- a/tests/baselines/reference/constDeclarations-errors.errors.txt +++ b/tests/baselines/reference/constDeclarations-errors.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/constDeclarations-errors.ts(3,7): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(4,7): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized +tests/cases/compiler/constDeclarations-errors.ts(3,7): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(4,7): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(5,7): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(5,11): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(5,15): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(5,27): error TS1155: 'const' declarations must be initialized. tests/cases/compiler/constDeclarations-errors.ts(10,27): error TS2540: Cannot assign to 'c8' because it is a constant or a read-only property. -tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized -tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized +tests/cases/compiler/constDeclarations-errors.ts(13,11): error TS1155: 'const' declarations must be initialized. +tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' declarations must be initialized. ==== tests/cases/compiler/constDeclarations-errors.ts (9 errors) ==== @@ -14,19 +14,19 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d // error, missing intialicer const c1; ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. const c2: number; ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. const c3, c4, c5 :string, c6; // error, missing initialicer ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. for(const c in {}) { } @@ -38,9 +38,9 @@ tests/cases/compiler/constDeclarations-errors.ts(16,20): error TS1155: 'const' d // error, can not be unintalized for(const c9; c9 < 1;) { } ~~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. // error, can not be unintalized for(const c10 = 0, c11; c10 < 1;) { } ~~~ -!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file +!!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/constructorAsType.errors.txt b/tests/baselines/reference/constructorAsType.errors.txt index 7865a5ecac5..780abecc1bc 100644 --- a/tests/baselines/reference/constructorAsType.errors.txt +++ b/tests/baselines/reference/constructorAsType.errors.txt @@ -1,12 +1,12 @@ tests/cases/compiler/constructorAsType.ts(1,5): error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. - Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }' + Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'. ==== tests/cases/compiler/constructorAsType.ts (1 errors) ==== var Person:new () => {name: string;} = function () {return {name:"joe"};}; ~~~~~~ !!! error TS2322: Type '() => { name: string; }' is not assignable to type 'new () => { name: string; }'. -!!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }' +!!! error TS2322: Type '() => { name: string; }' provides no match for the signature 'new (): { name: string; }'. var Person2:{new() : {name:string;};}; diff --git a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt index a615d7177cf..faab8a55145 100644 --- a/tests/baselines/reference/constructorReturnsInvalidType.errors.txt +++ b/tests/baselines/reference/constructorReturnsInvalidType.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2322: Type '1' is not assignable to type 'X'. -tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. ==== tests/cases/compiler/constructorReturnsInvalidType.ts (2 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/constructorReturnsInvalidType.ts(3,9): error TS2409: Return ~~~~~~~~~ !!! error TS2322: Type '1' is not assignable to type 'X'. ~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } foo() { } } diff --git a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt index f5948382d64..ef1765eb017 100644 --- a/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt +++ b/tests/baselines/reference/constructorWithAssignableReturnExpression.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2322: Type '1' is not assignable to type 'D'. -tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(12,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2322: Type '{ x: number; }' is not assignable to type 'F'. Types of property 'x' are incompatible. Type 'number' is not assignable to type 'T'. -tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts(26,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. ==== tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignableReturnExpression.ts (4 errors) ==== @@ -22,7 +22,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl ~~~~~~~~~ !!! error TS2322: Type '1' is not assignable to type 'D'. ~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } @@ -42,7 +42,7 @@ tests/cases/conformance/classes/constructorDeclarations/constructorWithAssignabl !!! error TS2322: Types of property 'x' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'T'. ~~~~~~~~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } diff --git a/tests/baselines/reference/controlFlowDeleteOperator.errors.txt b/tests/baselines/reference/controlFlowDeleteOperator.errors.txt index de84d602c95..a8cf358a29a 100644 --- a/tests/baselines/reference/controlFlowDeleteOperator.errors.txt +++ b/tests/baselines/reference/controlFlowDeleteOperator.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts (1 errors) ==== @@ -18,6 +18,6 @@ tests/cases/conformance/controlFlow/controlFlowDeleteOperator.ts(15,12): error T x; delete x; // No effect ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. x; } \ No newline at end of file diff --git a/tests/baselines/reference/declarationFileOverwriteError.errors.txt b/tests/baselines/reference/declarationFileOverwriteError.errors.txt index 211469778b1..846f2387dc1 100644 --- a/tests/baselines/reference/declarationFileOverwriteError.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteError.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/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 + 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 'tests/cases/compiler/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 +!!! 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. ==== tests/cases/compiler/a.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt index ea4a93b3b12..b3c9fd4780d 100644 --- a/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt +++ b/tests/baselines/reference/declarationFileOverwriteErrorWithOut.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/out.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 + 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 'tests/cases/compiler/out.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 +!!! 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. ==== tests/cases/compiler/out.d.ts (0 errors) ==== declare class c { diff --git a/tests/baselines/reference/deleteOperator1.errors.txt b/tests/baselines/reference/deleteOperator1.errors.txt index 09a839d10b4..c316a6e06a9 100644 --- a/tests/baselines/reference/deleteOperator1.errors.txt +++ b/tests/baselines/reference/deleteOperator1.errors.txt @@ -1,19 +1,19 @@ -tests/cases/compiler/deleteOperator1.ts(2,25): error TS2703: The operand of a delete operator must be a property reference -tests/cases/compiler/deleteOperator1.ts(3,21): error TS2703: The operand of a delete operator must be a property reference +tests/cases/compiler/deleteOperator1.ts(2,25): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/compiler/deleteOperator1.ts(3,21): error TS2703: The operand of a delete operator must be a property reference. tests/cases/compiler/deleteOperator1.ts(4,5): error TS2322: Type 'boolean' is not assignable to type 'number'. -tests/cases/compiler/deleteOperator1.ts(4,24): error TS2703: The operand of a delete operator must be a property reference +tests/cases/compiler/deleteOperator1.ts(4,24): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/compiler/deleteOperator1.ts (4 errors) ==== var a; var x: boolean = delete a; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var y: any = delete a; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var z: number = delete a; ~ !!! error TS2322: Type 'boolean' is not assignable to type 'number'. ~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorInStrictMode.errors.txt b/tests/baselines/reference/deleteOperatorInStrictMode.errors.txt index 16d3b772351..754406dbc6c 100644 --- a/tests/baselines/reference/deleteOperatorInStrictMode.errors.txt +++ b/tests/baselines/reference/deleteOperatorInStrictMode.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. -tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/compiler/deleteOperatorInStrictMode.ts (2 errors) ==== @@ -9,4 +9,4 @@ tests/cases/compiler/deleteOperatorInStrictMode.ts(3,8): error TS2703: The opera ~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. ~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt index 3e581f5a77b..3994654c523 100644 --- a/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt +++ b/tests/baselines/reference/deleteOperatorInvalidOperations.errors.txt @@ -1,10 +1,10 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,20): error TS1005: ',' expected. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,26): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(5,27): error TS1109: Expression expected. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,22): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(8,23): error TS1109: Expression expected. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS1102: 'delete' cannot be called on an identifier in strict mode. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts(13,16): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorInvalidOperations.ts (7 errors) ==== @@ -16,14 +16,14 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator ~~~~~~ !!! error TS1005: ',' expected. -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~ !!! error TS1109: Expression expected. // miss an operand var BOOLEAN2 = delete ; -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~ !!! error TS1109: Expression expected. @@ -34,6 +34,6 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator ~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. } } \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt index 819f1c39050..f2260b11036 100644 --- a/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithAnyOtherType.errors.txt @@ -1,31 +1,31 @@ -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(25,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(28,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(29,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(33,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(34,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(42,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(43,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(44,33): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,33): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(45,40): error TS2532: Object is possibly 'undefined'. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2531: Object is possibly 'null'. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,33): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(46,40): error TS2531: Object is possibly 'null'. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,33): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(47,45): error TS2532: Object is possibly 'undefined'. -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(50,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(51,47): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(54,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(55,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts(57,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithAnyOtherType.ts (28 errors) ==== @@ -55,30 +55,30 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator // any type var var ResultIsBoolean1 = delete ANY1; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean2 = delete ANY2; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean3 = delete A; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean4 = delete M; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean5 = delete obj; ~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean6 = delete obj1; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // any type literal var ResultIsBoolean7 = delete undefined; ~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean8 = delete null; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // any type expressions var ResultIsBoolean9 = delete ANY2[0]; @@ -88,60 +88,60 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator var ResultIsBoolean13 = delete M.n; var ResultIsBoolean14 = delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean15 = delete A.foo(); ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean16 = delete (ANY + ANY1); ~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean17 = delete (null + undefined); ~~~~ !!! error TS2531: Object is possibly 'null'. ~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. var ResultIsBoolean18 = delete (null + null); ~~~~ !!! error TS2531: Object is possibly 'null'. ~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~ !!! error TS2531: Object is possibly 'null'. var ResultIsBoolean19 = delete (undefined + undefined); ~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~ !!! error TS2532: Object is possibly 'undefined'. // multiple delete operators var ResultIsBoolean20 = delete delete ANY; ~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean21 = delete delete delete (ANY + ANY1); ~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // miss assignment operators delete ANY; ~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete ANY1; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete ANY2[0]; delete ANY, ANY1; ~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete obj1.x; delete obj1.y; delete objA.a; diff --git a/tests/baselines/reference/deleteOperatorWithBooleanType.errors.txt b/tests/baselines/reference/deleteOperatorWithBooleanType.errors.txt index 83ce7db9f33..3dfc6672997 100644 --- a/tests/baselines/reference/deleteOperatorWithBooleanType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithBooleanType.errors.txt @@ -1,14 +1,14 @@ -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(17,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(20,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(21,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,38): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(33,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(34,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(35,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(36,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(17,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(20,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(21,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(26,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(27,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(30,38): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(33,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(34,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(35,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts(36,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithBooleanType.ts (11 errors) ==== @@ -30,45 +30,45 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator // boolean type var var ResultIsBoolean1 = delete BOOLEAN; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // boolean type literal var ResultIsBoolean2 = delete true; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean3 = delete { x: true, y: false }; ~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // boolean type expressions var ResultIsBoolean4 = delete objA.a; var ResultIsBoolean5 = delete M.n; var ResultIsBoolean6 = delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean7 = delete A.foo(); ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // multiple delete operator var ResultIsBoolean8 = delete delete BOOLEAN; ~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // miss assignment operators delete true; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete BOOLEAN; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete true, false; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete objA.a; delete M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithEnumType.errors.txt b/tests/baselines/reference/deleteOperatorWithEnumType.errors.txt index 84c1ed48017..e952ce0fdc9 100644 --- a/tests/baselines/reference/deleteOperatorWithEnumType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithEnumType.errors.txt @@ -1,16 +1,16 @@ -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(7,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(8,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(11,31): error TS2704: The operand of a delete operator cannot be a read-only property -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,38): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,38): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,46): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(19,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(20,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(21,8): error TS2704: The operand of a delete operator cannot be a read-only property -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(22,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(7,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(8,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(11,31): error TS2704: The operand of a delete operator cannot be a read-only property. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(12,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(15,38): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,38): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(16,46): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(19,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(20,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(21,8): error TS2704: The operand of a delete operator cannot be a read-only property. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts(22,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithEnumType.ts (13 errors) ==== @@ -22,43 +22,43 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator // enum type var var ResultIsBoolean1 = delete ENUM; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean2 = delete ENUM1; ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // enum type expressions var ResultIsBoolean3 = delete ENUM1["A"]; ~~~~~~~~~~ -!!! error TS2704: The operand of a delete operator cannot be a read-only property +!!! error TS2704: The operand of a delete operator cannot be a read-only property. var ResultIsBoolean4 = delete (ENUM[0] + ENUM1["B"]); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // multiple delete operators var ResultIsBoolean5 = delete delete ENUM; ~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean6 = delete delete delete (ENUM[0] + ENUM1["B"]); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // miss assignment operators delete ENUM; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete ENUM1; ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete ENUM1.B; ~~~~~~~ -!!! error TS2704: The operand of a delete operator cannot be a read-only property +!!! error TS2704: The operand of a delete operator cannot be a read-only property. delete ENUM, ENUM1; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithNumberType.errors.txt b/tests/baselines/reference/deleteOperatorWithNumberType.errors.txt index b43c7aa8e3d..0f4a783d983 100644 --- a/tests/baselines/reference/deleteOperatorWithNumberType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithNumberType.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,47): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(39,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(35,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(36,47): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(39,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithNumberType.ts (17 errors) ==== @@ -37,21 +37,21 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator // number type var var ResultIsBoolean1 = delete NUMBER; ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean2 = delete NUMBER1; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // number type literal var ResultIsBoolean3 = delete 1; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean4 = delete { x: 1, y: 2}; ~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean5 = delete { x: 1, y: (n: number) => { return n; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // number type expressions var ResultIsBoolean6 = delete objA.a; @@ -59,41 +59,41 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator var ResultIsBoolean8 = delete NUMBER1[0]; var ResultIsBoolean9 = delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean10 = delete A.foo(); ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean11 = delete (NUMBER + NUMBER); ~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // multiple delete operator var ResultIsBoolean12 = delete delete NUMBER; ~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean13 = delete delete delete (NUMBER + NUMBER); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // miss assignment operators delete 1; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete NUMBER; ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete NUMBER1; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete objA.a; delete M.n; delete objA.a, M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteOperatorWithStringType.errors.txt b/tests/baselines/reference/deleteOperatorWithStringType.errors.txt index 37859d3ab24..fd46679d81a 100644 --- a/tests/baselines/reference/deleteOperatorWithStringType.errors.txt +++ b/tests/baselines/reference/deleteOperatorWithStringType.errors.txt @@ -1,21 +1,21 @@ -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(33,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,32): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,39): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,47): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(43,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(18,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(19,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(22,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(23,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(24,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(30,31): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(31,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(32,33): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(33,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(36,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,32): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,39): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(37,47): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(40,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(41,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(42,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts(43,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperatorWithStringType.ts (18 errors) ==== @@ -38,21 +38,21 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator // string type var var ResultIsBoolean1 = delete STRING; ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean2 = delete STRING1; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // string type literal var ResultIsBoolean3 = delete ""; ~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean4 = delete { x: "", y: "" }; ~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean5 = delete { x: "", y: (s: string) => { return s; } }; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // string type expressions var ResultIsBoolean6 = delete objA.a; @@ -60,42 +60,42 @@ tests/cases/conformance/expressions/unaryOperators/deleteOperator/deleteOperator var ResultIsBoolean8 = delete STRING1[0]; var ResultIsBoolean9 = delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean10 = delete A.foo(); ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean11 = delete (STRING + STRING); ~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean12 = delete STRING.charAt(0); ~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // multiple delete operator var ResultIsBoolean13 = delete delete STRING; ~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. var ResultIsBoolean14 = delete delete delete (STRING + STRING); ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. ~~~~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. // miss assignment operators delete ""; ~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete STRING; ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete STRING1; ~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete foo(); ~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete objA.a,M.n; \ No newline at end of file diff --git a/tests/baselines/reference/deleteReadonly.errors.txt b/tests/baselines/reference/deleteReadonly.errors.txt index 4e5a3275b80..fbcfbc3bbc9 100644 --- a/tests/baselines/reference/deleteReadonly.errors.txt +++ b/tests/baselines/reference/deleteReadonly.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/deleteReadonly.ts(8,8): error TS2704: The operand of a delete operator cannot be a read-only property +tests/cases/compiler/deleteReadonly.ts(8,8): error TS2704: The operand of a delete operator cannot be a read-only property. tests/cases/compiler/deleteReadonly.ts(18,8): error TS2542: Index signature in type 'B' only permits reading. tests/cases/compiler/deleteReadonly.ts(20,12): error TS2542: Index signature in type 'B' only permits reading. @@ -13,7 +13,7 @@ tests/cases/compiler/deleteReadonly.ts(20,12): error TS2542: Index signature in delete a.b; ~~~ -!!! error TS2704: The operand of a delete operator cannot be a read-only property +!!! error TS2704: The operand of a delete operator cannot be a read-only property. interface B { readonly [k: string]: string diff --git a/tests/baselines/reference/downlevelLetConst11.errors.txt b/tests/baselines/reference/downlevelLetConst11.errors.txt index 29932f55c1f..08456c61624 100644 --- a/tests/baselines/reference/downlevelLetConst11.errors.txt +++ b/tests/baselines/reference/downlevelLetConst11.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS2304: Cannot find name 'let'. @@ -6,6 +6,6 @@ tests/cases/compiler/downlevelLetConst11.ts(2,1): error TS2304: Cannot find name "use strict"; let ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. ~~~ !!! error TS2304: Cannot find name 'let'. \ No newline at end of file diff --git a/tests/baselines/reference/downlevelLetConst2.errors.txt b/tests/baselines/reference/downlevelLetConst2.errors.txt index 9da0c94a12e..57108d9348d 100644 --- a/tests/baselines/reference/downlevelLetConst2.errors.txt +++ b/tests/baselines/reference/downlevelLetConst2.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/downlevelLetConst2.ts(1,7): error TS1155: 'const' declarations must be initialized +tests/cases/compiler/downlevelLetConst2.ts(1,7): error TS1155: 'const' declarations must be initialized. ==== tests/cases/compiler/downlevelLetConst2.ts (1 errors) ==== const a ~ -!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file +!!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/downlevelLetConst4.errors.txt b/tests/baselines/reference/downlevelLetConst4.errors.txt index 3bf3e58cecc..93ab865e1ca 100644 --- a/tests/baselines/reference/downlevelLetConst4.errors.txt +++ b/tests/baselines/reference/downlevelLetConst4.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/downlevelLetConst4.ts(1,7): error TS1155: 'const' declarations must be initialized +tests/cases/compiler/downlevelLetConst4.ts(1,7): error TS1155: 'const' declarations must be initialized. ==== tests/cases/compiler/downlevelLetConst4.ts (1 errors) ==== const a: number ~ -!!! error TS1155: 'const' declarations must be initialized \ No newline at end of file +!!! error TS1155: 'const' declarations must be initialized. \ No newline at end of file diff --git a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt index db7d0205fc9..7ef43dc6470 100644 --- a/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt +++ b/tests/baselines/reference/duplicateIdentifiersAcrossFileBoundaries.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/file1.ts(5,10): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/file1.ts(9,12): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/file2.ts(3,10): error TS2300: Duplicate identifier 'C2'. tests/cases/compiler/file2.ts(4,7): error TS2300: Duplicate identifier 'f'. -tests/cases/compiler/file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/compiler/file2.ts(7,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'. @@ -44,7 +44,7 @@ tests/cases/compiler/file2.ts(8,16): error TS2300: Duplicate identifier 'x'. module Foo { ~~~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var x: number; // error for redeclaring var in a different parent ~ !!! error TS2300: Duplicate identifier 'x'. diff --git a/tests/baselines/reference/duplicateLabel1.errors.txt b/tests/baselines/reference/duplicateLabel1.errors.txt index cf116f656fc..03d4e999597 100644 --- a/tests/baselines/reference/duplicateLabel1.errors.txt +++ b/tests/baselines/reference/duplicateLabel1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'target' +tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'target'. ==== tests/cases/compiler/duplicateLabel1.ts (1 errors) ==== @@ -6,6 +6,6 @@ tests/cases/compiler/duplicateLabel1.ts(3,1): error TS1114: Duplicate label 'tar target: target: ~~~~~~ -!!! error TS1114: Duplicate label 'target' +!!! error TS1114: Duplicate label 'target'. while (true) { } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateLabel2.errors.txt b/tests/baselines/reference/duplicateLabel2.errors.txt index 2a87ed96648..d178a8ffe5c 100644 --- a/tests/baselines/reference/duplicateLabel2.errors.txt +++ b/tests/baselines/reference/duplicateLabel2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'target' +tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'target'. ==== tests/cases/compiler/duplicateLabel2.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/duplicateLabel2.ts(4,3): error TS1114: Duplicate label 'tar while (true) { target: ~~~~~~ -!!! error TS1114: Duplicate label 'target' +!!! error TS1114: Duplicate label 'target'. while (true) { } } \ No newline at end of file diff --git a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt index 85dd29b78a3..dde5940539c 100644 --- a/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt +++ b/tests/baselines/reference/duplicateSymbolsExportMatching.errors.txt @@ -9,7 +9,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(43,16): error TS2395: Ind tests/cases/compiler/duplicateSymbolsExportMatching.ts(44,9): error TS2395: Individual declarations in merged declaration 'w' must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(45,16): error TS2395: Individual declarations in merged declaration 'w' must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local. -tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/duplicateSymbolsExportMatching.ts(49,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. tests/cases/compiler/duplicateSymbolsExportMatching.ts(52,21): error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(56,11): error TS2395: Individual declarations in merged declaration 'C' must be all exported or all local. tests/cases/compiler/duplicateSymbolsExportMatching.ts(57,12): error TS2395: Individual declarations in merged declaration 'C' must be all exported or all local. @@ -91,7 +91,7 @@ tests/cases/compiler/duplicateSymbolsExportMatching.ts(65,18): error TS2395: Ind ~ !!! error TS2395: Individual declarations in merged declaration 'F' must be all exported or all local. ~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. var t; } export function F() { } // Only one error for duplicate identifier (don't consider visibility) diff --git a/tests/baselines/reference/duplicateVarAndImport2.errors.txt b/tests/baselines/reference/duplicateVarAndImport2.errors.txt index 192b16eaab9..e537eac9afb 100644 --- a/tests/baselines/reference/duplicateVarAndImport2.errors.txt +++ b/tests/baselines/reference/duplicateVarAndImport2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with local declaration of 'a' +tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declaration conflicts with local declaration of 'a'. ==== tests/cases/compiler/duplicateVarAndImport2.ts (1 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/duplicateVarAndImport2.ts(4,1): error TS2440: Import declar module M { export var x = 1; } import a = M; ~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'a' \ No newline at end of file +!!! error TS2440: Import declaration conflicts with local declaration of 'a'. \ No newline at end of file diff --git a/tests/baselines/reference/emitter.forAwait.es5.js b/tests/baselines/reference/emitter.forAwait.es5.js index efbbe872b3f..14b70e933bb 100644 --- a/tests/baselines/reference/emitter.forAwait.es5.js +++ b/tests/baselines/reference/emitter.forAwait.es5.js @@ -68,36 +68,36 @@ var __asyncValues = (this && this.__asyncIterator) || function (o) { }; function f1() { return __awaiter(this, void 0, void 0, function () { - var y, y_1, y_1_1, x, _a, e_1, _b; - return __generator(this, function (_c) { - switch (_c.label) { + var y, y_1, y_1_1, x, e_1_1, e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { case 0: - _c.trys.push([0, 6, 7, 12]); + _b.trys.push([0, 6, 7, 12]); y_1 = __asyncValues(y); return [4 /*yield*/, y_1.next()]; case 1: - y_1_1 = _c.sent(); - _c.label = 2; + y_1_1 = _b.sent(); + _b.label = 2; case 2: if (!!y_1_1.done) return [3 /*break*/, 5]; x = y_1_1.value; - _c.label = 3; + _b.label = 3; case 3: return [4 /*yield*/, y_1.next()]; case 4: - y_1_1 = _c.sent(); + y_1_1 = _b.sent(); return [3 /*break*/, 2]; case 5: return [3 /*break*/, 12]; case 6: - _a = _c.sent(); + e_1_1 = _b.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/, 12]; case 7: - _c.trys.push([7, , 10, 11]); - if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, _b.call(y_1)]; + _b.trys.push([7, , 10, 11]); + if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9]; + return [4 /*yield*/, _a.call(y_1)]; case 8: - _c.sent(); - _c.label = 9; + _b.sent(); + _b.label = 9; case 9: return [3 /*break*/, 11]; case 10: if (e_1) throw e_1.error; @@ -151,36 +151,36 @@ var __asyncValues = (this && this.__asyncIterator) || function (o) { }; function f2() { return __awaiter(this, void 0, void 0, function () { - var x, y, y_1, y_1_1, _a, e_1, _b; - return __generator(this, function (_c) { - switch (_c.label) { + var x, y, y_1, y_1_1, e_1_1, e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { case 0: - _c.trys.push([0, 6, 7, 12]); + _b.trys.push([0, 6, 7, 12]); y_1 = __asyncValues(y); return [4 /*yield*/, y_1.next()]; case 1: - y_1_1 = _c.sent(); - _c.label = 2; + y_1_1 = _b.sent(); + _b.label = 2; case 2: if (!!y_1_1.done) return [3 /*break*/, 5]; x = y_1_1.value; - _c.label = 3; + _b.label = 3; case 3: return [4 /*yield*/, y_1.next()]; case 4: - y_1_1 = _c.sent(); + y_1_1 = _b.sent(); return [3 /*break*/, 2]; case 5: return [3 /*break*/, 12]; case 6: - _a = _c.sent(); + e_1_1 = _b.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/, 12]; case 7: - _c.trys.push([7, , 10, 11]); - if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, _b.call(y_1)]; + _b.trys.push([7, , 10, 11]); + if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9]; + return [4 /*yield*/, _a.call(y_1)]; case 8: - _c.sent(); - _c.label = 9; + _b.sent(); + _b.label = 9; case 9: return [3 /*break*/, 11]; case 10: if (e_1) throw e_1.error; @@ -239,36 +239,36 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar }; function f3() { return __asyncGenerator(this, arguments, function f3_1() { - var y, y_1, y_1_1, x, _a, e_1, _b; - return __generator(this, function (_c) { - switch (_c.label) { + var y, y_1, y_1_1, x, e_1_1, e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { case 0: - _c.trys.push([0, 6, 7, 12]); + _b.trys.push([0, 6, 7, 12]); y_1 = __asyncValues(y); return [4 /*yield*/, ["await", y_1.next()]]; case 1: - y_1_1 = _c.sent(); - _c.label = 2; + y_1_1 = _b.sent(); + _b.label = 2; case 2: if (!!y_1_1.done) return [3 /*break*/, 5]; x = y_1_1.value; - _c.label = 3; + _b.label = 3; case 3: return [4 /*yield*/, ["await", y_1.next()]]; case 4: - y_1_1 = _c.sent(); + y_1_1 = _b.sent(); return [3 /*break*/, 2]; case 5: return [3 /*break*/, 12]; case 6: - _a = _c.sent(); + e_1_1 = _b.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/, 12]; case 7: - _c.trys.push([7, , 10, 11]); - if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, ["await", _b.call(y_1)]]; + _b.trys.push([7, , 10, 11]); + if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9]; + return [4 /*yield*/, ["await", _a.call(y_1)]]; case 8: - _c.sent(); - _c.label = 9; + _b.sent(); + _b.label = 9; case 9: return [3 /*break*/, 11]; case 10: if (e_1) throw e_1.error; @@ -327,36 +327,36 @@ var __asyncGenerator = (this && this.__asyncGenerator) || function (thisArg, _ar }; function f4() { return __asyncGenerator(this, arguments, function f4_1() { - var x, y, y_1, y_1_1, _a, e_1, _b; - return __generator(this, function (_c) { - switch (_c.label) { + var x, y, y_1, y_1_1, e_1_1, e_1, _a; + return __generator(this, function (_b) { + switch (_b.label) { case 0: - _c.trys.push([0, 6, 7, 12]); + _b.trys.push([0, 6, 7, 12]); y_1 = __asyncValues(y); return [4 /*yield*/, ["await", y_1.next()]]; case 1: - y_1_1 = _c.sent(); - _c.label = 2; + y_1_1 = _b.sent(); + _b.label = 2; case 2: if (!!y_1_1.done) return [3 /*break*/, 5]; x = y_1_1.value; - _c.label = 3; + _b.label = 3; case 3: return [4 /*yield*/, ["await", y_1.next()]]; case 4: - y_1_1 = _c.sent(); + y_1_1 = _b.sent(); return [3 /*break*/, 2]; case 5: return [3 /*break*/, 12]; case 6: - _a = _c.sent(); + e_1_1 = _b.sent(); e_1 = { error: e_1_1 }; return [3 /*break*/, 12]; case 7: - _c.trys.push([7, , 10, 11]); - if (!(y_1_1 && !y_1_1.done && (_b = y_1.return))) return [3 /*break*/, 9]; - return [4 /*yield*/, ["await", _b.call(y_1)]]; + _b.trys.push([7, , 10, 11]); + if (!(y_1_1 && !y_1_1.done && (_a = y_1.return))) return [3 /*break*/, 9]; + return [4 /*yield*/, ["await", _a.call(y_1)]]; case 8: - _c.sent(); - _c.label = 9; + _b.sent(); + _b.label = 9; case 9: return [3 /*break*/, 11]; case 10: if (e_1) throw e_1.error; diff --git a/tests/baselines/reference/enumErrors.errors.txt b/tests/baselines/reference/enumErrors.errors.txt index f0978df709c..3efa042ff38 100644 --- a/tests/baselines/reference/enumErrors.errors.txt +++ b/tests/baselines/reference/enumErrors.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any' -tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number' -tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string' -tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean' +tests/cases/conformance/enums/enumErrors.ts(2,6): error TS2431: Enum name cannot be 'any'. +tests/cases/conformance/enums/enumErrors.ts(3,6): error TS2431: Enum name cannot be 'number'. +tests/cases/conformance/enums/enumErrors.ts(4,6): error TS2431: Enum name cannot be 'string'. +tests/cases/conformance/enums/enumErrors.ts(5,6): error TS2431: Enum name cannot be 'boolean'. tests/cases/conformance/enums/enumErrors.ts(9,9): error TS2322: Type 'Number' is not assignable to type 'E5'. tests/cases/conformance/enums/enumErrors.ts(26,9): error TS2322: Type '""' is not assignable to type 'E11'. tests/cases/conformance/enums/enumErrors.ts(27,9): error TS2322: Type 'Date' is not assignable to type 'E11'. @@ -13,16 +13,16 @@ tests/cases/conformance/enums/enumErrors.ts(29,9): error TS2322: Type '{}' is no // Enum named with PredefinedTypes enum any { } ~~~ -!!! error TS2431: Enum name cannot be 'any' +!!! error TS2431: Enum name cannot be 'any'. enum number { } ~~~~~~ -!!! error TS2431: Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number'. enum string { } ~~~~~~ -!!! error TS2431: Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string'. enum boolean { } ~~~~~~~ -!!! error TS2431: Enum name cannot be 'boolean' +!!! error TS2431: Enum name cannot be 'boolean'. // Enum with computed member initializer of type Number enum E5 { diff --git a/tests/baselines/reference/enumWithPrimitiveName.errors.txt b/tests/baselines/reference/enumWithPrimitiveName.errors.txt index 403c0855ebb..babcc69adea 100644 --- a/tests/baselines/reference/enumWithPrimitiveName.errors.txt +++ b/tests/baselines/reference/enumWithPrimitiveName.errors.txt @@ -1,15 +1,15 @@ -tests/cases/compiler/enumWithPrimitiveName.ts(1,6): error TS2431: Enum name cannot be 'string' -tests/cases/compiler/enumWithPrimitiveName.ts(2,6): error TS2431: Enum name cannot be 'number' -tests/cases/compiler/enumWithPrimitiveName.ts(3,6): error TS2431: Enum name cannot be 'any' +tests/cases/compiler/enumWithPrimitiveName.ts(1,6): error TS2431: Enum name cannot be 'string'. +tests/cases/compiler/enumWithPrimitiveName.ts(2,6): error TS2431: Enum name cannot be 'number'. +tests/cases/compiler/enumWithPrimitiveName.ts(3,6): error TS2431: Enum name cannot be 'any'. ==== tests/cases/compiler/enumWithPrimitiveName.ts (3 errors) ==== enum string { } ~~~~~~ -!!! error TS2431: Enum name cannot be 'string' +!!! error TS2431: Enum name cannot be 'string'. enum number { } ~~~~~~ -!!! error TS2431: Enum name cannot be 'number' +!!! error TS2431: Enum name cannot be 'number'. enum any { } ~~~ -!!! error TS2431: Enum name cannot be 'any' \ No newline at end of file +!!! error TS2431: Enum name cannot be 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt index 8b67ddfeac3..87311d3557c 100644 --- a/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt +++ b/tests/baselines/reference/es6ImportDefaultBindingMergeErrors.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(5,8): error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2' +tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(5,8): error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'. tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(7,8): error TS2300: Duplicate identifier 'defaultBinding3'. tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(8,8): error TS2300: Duplicate identifier 'defaultBinding3'. @@ -15,7 +15,7 @@ tests/cases/compiler/es6ImportDefaultBindingMergeErrors_1.ts(8,8): error TS2300: var x = defaultBinding; import defaultBinding2 from "./es6ImportDefaultBindingMergeErrors_0"; // Should be error ~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2' +!!! error TS2440: Import declaration conflicts with local declaration of 'defaultBinding2'. var defaultBinding2 = "hello world"; import defaultBinding3 from "./es6ImportDefaultBindingMergeErrors_0"; // Should be error ~~~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt index b8b22ce3ed1..de9ba696532 100644 --- a/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt +++ b/tests/baselines/reference/es6ImportNameSpaceImportMergeErrors.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(4,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'. tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(5,13): error TS2300: Duplicate identifier 'nameSpaceBinding1'. -tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3' +tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'. ==== tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_0.ts (0 errors) ==== @@ -20,6 +20,6 @@ tests/cases/compiler/es6ImportNameSpaceImportMergeErrors_1.ts(7,8): error TS2440 import * as nameSpaceBinding3 from "./es6ImportNameSpaceImportMergeErrors_0"; // should be error ~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3' +!!! error TS2440: Import declaration conflicts with local declaration of 'nameSpaceBinding3'. var nameSpaceBinding3 = 10; \ No newline at end of file diff --git a/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt b/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt index 4fca12ee8e1..0646e4f2fd6 100644 --- a/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt +++ b/tests/baselines/reference/es6ImportNamedImportMergeErrors.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'x' -tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(7,10): error TS2440: Import declaration conflicts with local declaration of 'x44' +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(5,10): error TS2440: Import declaration conflicts with local declaration of 'x'. +tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(7,10): error TS2440: Import declaration conflicts with local declaration of 'x44'. tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(9,10): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(10,16): error TS2300: Duplicate identifier 'z'. @@ -18,11 +18,11 @@ tests/cases/compiler/es6ImportNamedImportMergeErrors_1.ts(10,16): error TS2300: interface x1 { } // shouldnt be error import { x } from "./es6ImportNamedImportMergeErrors_0"; // should be error ~ -!!! error TS2440: Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x'. var x = 10; import { x as x44 } from "./es6ImportNamedImportMergeErrors_0"; // should be error ~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'x44' +!!! error TS2440: Import declaration conflicts with local declaration of 'x44'. var x44 = 10; import { z } from "./es6ImportNamedImportMergeErrors_0"; // should be error ~ diff --git a/tests/baselines/reference/evalAfter0.errors.txt b/tests/baselines/reference/evalAfter0.errors.txt new file mode 100644 index 00000000000..448772eda08 --- /dev/null +++ b/tests/baselines/reference/evalAfter0.errors.txt @@ -0,0 +1,10 @@ +tests/cases/compiler/evalAfter0.ts(4,2): error TS2695: Left side of comma operator is unused and has no side effects. + + +==== tests/cases/compiler/evalAfter0.ts (1 errors) ==== + (0,eval)("10"); // fine: special case for eval + + declare var eva; + (0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) + ~ +!!! error TS2695: Left side of comma operator is unused and has no side effects. \ No newline at end of file diff --git a/tests/baselines/reference/evalAfter0.js b/tests/baselines/reference/evalAfter0.js new file mode 100644 index 00000000000..aeaa8f6476c --- /dev/null +++ b/tests/baselines/reference/evalAfter0.js @@ -0,0 +1,9 @@ +//// [evalAfter0.ts] +(0,eval)("10"); // fine: special case for eval + +declare var eva; +(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) + +//// [evalAfter0.js] +(0, eval)("10"); // fine: special case for eval +(0, eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) diff --git a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt index 1075c505794..057ceb0c71d 100644 --- a/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorSyntaxError2.errors.txt @@ -1,27 +1,27 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(5,8): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(6,8): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(7,8): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,1): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(8,8): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,13): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(11,13): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,13): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(12,13): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,13): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(13,13): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,6): error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,13): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(14,13): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(16,1): error TS17006: An unary expression with the 'typeof' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxError2.ts(17,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. @@ -110,28 +110,28 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** delete --temp ** 3; @@ -140,28 +140,28 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorSyntaxE ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** delete ++temp ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** delete temp-- ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** delete temp++ ** 3; ~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~~~~~~~~ !!! error TS17006: An unary expression with the 'delete' operator is not allowed in the left-hand side of an exponentiation expression. Consider enclosing the expression in parentheses. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. typeof --temp ** 3; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt index b643a71c5c8..77f20df2597 100644 --- a/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt +++ b/tests/baselines/reference/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.errors.txt @@ -19,21 +19,21 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(25,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(26,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,9): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(28,9): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,9): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(29,9): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,9): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(30,9): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,1): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,9): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(31,9): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,14): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(33,14): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,14): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(34,14): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,14): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(35,14): error TS2703: The operand of a delete operator must be a property reference. tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,6): error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. -tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,14): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts(36,14): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInvalidSimpleUnaryExpressionOperands.ts (36 errors) ==== @@ -108,40 +108,40 @@ tests/cases/conformance/es7/exponentiationOperator/exponentiationOperatorWithInv ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. (delete ++temp) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. (delete temp--) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. (delete temp++) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** (delete --temp) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** (delete ++temp) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** (delete temp--) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. 1 ** (delete temp++) ** 3; ~~~~~~~~~~~~~~~ !!! error TS2362: The left-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type. ~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultInJsFile01.errors.txt b/tests/baselines/reference/exportDefaultInJsFile01.errors.txt index 0565c8bd61e..78b2ee664b9 100644 --- a/tests/baselines/reference/exportDefaultInJsFile01.errors.txt +++ b/tests/baselines/reference/exportDefaultInJsFile01.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile01.js' 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 + 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 'tests/cases/conformance/salsa/myFile01.js' 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 +!!! 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. ==== tests/cases/conformance/salsa/myFile01.js (0 errors) ==== export default "hello"; \ No newline at end of file diff --git a/tests/baselines/reference/exportDefaultInJsFile02.errors.txt b/tests/baselines/reference/exportDefaultInJsFile02.errors.txt index a74fbacfcfd..f53233a1eff 100644 --- a/tests/baselines/reference/exportDefaultInJsFile02.errors.txt +++ b/tests/baselines/reference/exportDefaultInJsFile02.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/conformance/salsa/myFile02.js' 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 + 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 'tests/cases/conformance/salsa/myFile02.js' 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 +!!! 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. ==== tests/cases/conformance/salsa/myFile02.js (0 errors) ==== export default "hello"; \ No newline at end of file diff --git a/tests/baselines/reference/extendsUntypedModule.errors.txt b/tests/baselines/reference/extendsUntypedModule.errors.txt new file mode 100644 index 00000000000..9a1c4235352 --- /dev/null +++ b/tests/baselines/reference/extendsUntypedModule.errors.txt @@ -0,0 +1,14 @@ +/a.ts(2,17): error TS2507: Type 'any' is not a constructor function type. + + +==== /a.ts (1 errors) ==== + import Foo from "foo"; + class A extends Foo { } + ~~~ +!!! error TS2507: Type 'any' is not a constructor function type. + +==== /node_modules/foo/index.js (0 errors) ==== + // Test that extending an untyped module is an error, unlike extending unknownSymbol. + + This file is not read. + \ No newline at end of file diff --git a/tests/baselines/reference/extendsUntypedModule.js b/tests/baselines/reference/extendsUntypedModule.js new file mode 100644 index 00000000000..f86ded7e6cb --- /dev/null +++ b/tests/baselines/reference/extendsUntypedModule.js @@ -0,0 +1,33 @@ +//// [tests/cases/compiler/extendsUntypedModule.ts] //// + +//// [index.js] +// Test that extending an untyped module is an error, unlike extending unknownSymbol. + +This file is not read. + +//// [a.ts] +import Foo from "foo"; +class A extends Foo { } + + +//// [a.js] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var foo_1 = require("foo"); +var A = (function (_super) { + __extends(A, _super); + function A() { + return _super !== null && _super.apply(this, arguments) || this; + } + return A; +}(foo_1["default"])); diff --git a/tests/baselines/reference/for-of2.errors.txt b/tests/baselines/reference/for-of2.errors.txt index 1975f8be0af..3bf3b679898 100644 --- a/tests/baselines/reference/for-of2.errors.txt +++ b/tests/baselines/reference/for-of2.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/es6/for-ofStatements/for-of2.ts(1,7): error TS1155: 'const' declarations must be initialized +tests/cases/conformance/es6/for-ofStatements/for-of2.ts(1,7): error TS1155: 'const' declarations must be initialized. tests/cases/conformance/es6/for-ofStatements/for-of2.ts(2,6): error TS2540: Cannot assign to 'v' because it is a constant or a read-only property. ==== tests/cases/conformance/es6/for-ofStatements/for-of2.ts (2 errors) ==== const v; ~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. for (v of []) { } ~ !!! error TS2540: Cannot assign to 'v' because it is a constant or a read-only property. \ No newline at end of file diff --git a/tests/baselines/reference/functionAndImportNameConflict.errors.txt b/tests/baselines/reference/functionAndImportNameConflict.errors.txt index 4ca496cfb65..0711165bbce 100644 --- a/tests/baselines/reference/functionAndImportNameConflict.errors.txt +++ b/tests/baselines/reference/functionAndImportNameConflict.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/f2.ts(1,9): error TS2440: Import declaration conflicts with local declaration of 'f' +tests/cases/compiler/f2.ts(1,9): error TS2440: Import declaration conflicts with local declaration of 'f'. ==== tests/cases/compiler/f1.ts (0 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/f2.ts(1,9): error TS2440: Import declaration conflicts with ==== tests/cases/compiler/f2.ts (1 errors) ==== import {f} from './f1'; ~ -!!! error TS2440: Import declaration conflicts with local declaration of 'f' +!!! error TS2440: Import declaration conflicts with local declaration of 'f'. export function f() { } \ No newline at end of file diff --git a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt index 7f3d8d90802..06cdca868ad 100644 --- a/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt +++ b/tests/baselines/reference/functionConstraintSatisfaction2.errors.txt @@ -2,21 +2,21 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(6,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(7,1): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(23,14): error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. - Type 'Function' provides no match for the signature '(x: string): string' + Type 'Function' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(24,15): error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. Types of parameters 'x' and 'x' are incompatible. Type 'string' is not assignable to type 'string[]'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(25,15): error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. - Type 'typeof C' provides no match for the signature '(x: string): string' + Type 'typeof C' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(26,15): error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. - Type 'new (x: string) => string' provides no match for the signature '(x: string): string' + Type 'new (x: string) => string' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(28,16): error TS2345: Argument of type '(x: U, y: V) => U' is not assignable to parameter of type '(x: string) => string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(29,16): error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. - Type 'typeof C2' provides no match for the signature '(x: string): string' + Type 'typeof C2' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(30,16): error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. - Type 'new (x: T) => T' provides no match for the signature '(x: string): string' + Type 'new (x: T) => T' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(34,16): error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. - Type 'F2' provides no match for the signature '(x: string): string' + Type 'F2' provides no match for the signature '(x: string): string'. tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstraintSatisfaction2.ts(37,10): error TS2345: Argument of type 'T' is not assignable to parameter of type '(x: string) => string'. Type '() => void' is not assignable to type '(x: string) => string'. Type 'void' is not assignable to type 'string'. @@ -58,7 +58,7 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain var r = foo2(new Function()); ~~~~~~~~~~~~~~ !!! error TS2345: Argument of type 'Function' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'Function' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'Function' provides no match for the signature '(x: string): string'. var r2 = foo2((x: string[]) => x); ~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '(x: string[]) => string[]' is not assignable to parameter of type '(x: string) => string'. @@ -67,11 +67,11 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain var r6 = foo2(C); ~ !!! error TS2345: Argument of type 'typeof C' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'typeof C' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'typeof C' provides no match for the signature '(x: string): string'. var r7 = foo2(b); ~ !!! error TS2345: Argument of type 'new (x: string) => string' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'new (x: string) => string' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'new (x: string) => string' provides no match for the signature '(x: string): string'. var r8 = foo2((x: U) => x); // no error expected var r11 = foo2((x: U, y: V) => x); ~~~~~~~~~~~~~~~~~~~~~~~ @@ -79,18 +79,18 @@ tests/cases/conformance/types/typeParameters/typeArgumentLists/functionConstrain var r13 = foo2(C2); ~~ !!! error TS2345: Argument of type 'typeof C2' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'typeof C2' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'typeof C2' provides no match for the signature '(x: string): string'. var r14 = foo2(b2); ~~ !!! error TS2345: Argument of type 'new (x: T) => T' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'new (x: T) => T' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'new (x: T) => T' provides no match for the signature '(x: string): string'. interface F2 extends Function { foo: string; } var f2: F2; var r16 = foo2(f2); ~~ !!! error TS2345: Argument of type 'F2' is not assignable to parameter of type '(x: string) => string'. -!!! error TS2345: Type 'F2' provides no match for the signature '(x: string): string' +!!! error TS2345: Type 'F2' provides no match for the signature '(x: string): string'. function fff(x: T, y: U) { foo2(x); diff --git a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt index 02aa57937ba..18429658f28 100644 --- a/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt +++ b/tests/baselines/reference/funduleSplitAcrossFiles.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. ==== tests/cases/compiler/funduleSplitAcrossFiles_function.ts (0 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/funduleSplitAcrossFiles_module.ts(1,8): error TS2433: A nam ==== tests/cases/compiler/funduleSplitAcrossFiles_module.ts (1 errors) ==== module D { ~ -!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged +!!! error TS2433: A namespace declaration cannot be in a different file from a class or function with which it is merged. export var y = "hi"; } D.y; \ No newline at end of file diff --git a/tests/baselines/reference/generatorTypeCheck31.errors.txt b/tests/baselines/reference/generatorTypeCheck31.errors.txt index 3f54edacb2a..437b7470069 100644 --- a/tests/baselines/reference/generatorTypeCheck31.errors.txt +++ b/tests/baselines/reference/generatorTypeCheck31.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts(2,11): error TS2322: Type 'IterableIterator<(x: any) => any>' is not assignable to type '() => Iterable<(x: string) => number>'. - Type 'IterableIterator<(x: any) => any>' provides no match for the signature '(): Iterable<(x: string) => number>' + Type 'IterableIterator<(x: any) => any>' provides no match for the signature '(): Iterable<(x: string) => number>'. ==== tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts (1 errors) ==== @@ -11,5 +11,5 @@ tests/cases/conformance/es6/yieldExpressions/generatorTypeCheck31.ts(2,11): erro } () ~~~~~~~~ !!! error TS2322: Type 'IterableIterator<(x: any) => any>' is not assignable to type '() => Iterable<(x: string) => number>'. -!!! error TS2322: Type 'IterableIterator<(x: any) => any>' provides no match for the signature '(): Iterable<(x: string) => number>' +!!! error TS2322: Type 'IterableIterator<(x: any) => any>' provides no match for the signature '(): Iterable<(x: string) => number>'. } \ No newline at end of file diff --git a/tests/baselines/reference/genericSpecializations2.errors.txt b/tests/baselines/reference/genericSpecializations2.errors.txt index 49729ca1d8c..9d58731b6fb 100644 --- a/tests/baselines/reference/genericSpecializations2.errors.txt +++ b/tests/baselines/reference/genericSpecializations2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/genericSpecializations2.ts(8,9): error TS2368: Type parameter name cannot be 'string' -tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parameter name cannot be 'string' +tests/cases/compiler/genericSpecializations2.ts(8,9): error TS2368: Type parameter name cannot be 'string'. +tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parameter name cannot be 'string'. ==== tests/cases/compiler/genericSpecializations2.ts (2 errors) ==== @@ -12,13 +12,13 @@ tests/cases/compiler/genericSpecializations2.ts(12,9): error TS2368: Type parame class IntFooBad implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! error TS2368: Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string'. } class StringFoo2 implements IFoo { foo(x: string): string { return null; } ~~~~~~ -!!! error TS2368: Type parameter name cannot be 'string' +!!! error TS2368: Type parameter name cannot be 'string'. } class StringFoo3 implements IFoo { diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt index cae8612481a..145540914a7 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict1.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration conflicts with local declaration of 'x' +tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440: Import declaration conflicts with local declaration of 'x'. ==== tests/cases/compiler/importAndVariableDeclarationConflict1.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/importAndVariableDeclarationConflict1.ts(5,1): error TS2440 import x = m.m; ~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x'. var x = ''; \ No newline at end of file diff --git a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt index 4905d4d2a73..8dbbf76a1dc 100644 --- a/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt +++ b/tests/baselines/reference/importAndVariableDeclarationConflict4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration conflicts with local declaration of 'x' +tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440: Import declaration conflicts with local declaration of 'x'. ==== tests/cases/compiler/importAndVariableDeclarationConflict4.ts (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/compiler/importAndVariableDeclarationConflict4.ts(6,1): error TS2440 var x = ''; import x = m.m; ~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'x' +!!! error TS2440: Import declaration conflicts with local declaration of 'x'. \ No newline at end of file diff --git a/tests/baselines/reference/inOperator.errors.txt b/tests/baselines/reference/inOperator.errors.txt index 7c9c874ea19..3ab9f03595e 100644 --- a/tests/baselines/reference/inOperator.errors.txt +++ b/tests/baselines/reference/inOperator.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/inOperator.ts(7,15): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/compiler/inOperator.ts(7,15): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. ==== tests/cases/compiler/inOperator.ts (1 errors) ==== @@ -10,7 +10,7 @@ tests/cases/compiler/inOperator.ts(7,15): error TS2361: The right-hand side of a var b = '' in 0; ~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var c: any; var y: number; diff --git a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt index 7615008d89c..ff411f60c47 100644 --- a/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt +++ b/tests/baselines/reference/inOperatorWithInvalidOperands.errors.txt @@ -5,18 +5,18 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(17,11): error TS2532: Object is possibly 'undefined'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(19,11): error TS2360: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(20,11): error TS2360: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(30,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(31,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(32,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(33,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(34,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(35,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(36,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(37,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(30,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(31,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(32,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(33,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(34,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(35,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(36,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(37,16): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(38,16): error TS2531: Object is possibly 'null'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(39,17): error TS2532: Object is possibly 'undefined'. tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(43,11): error TS2360: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. -tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(43,17): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts(43,17): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. ==== tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInvalidOperands.ts (19 errors) ==== @@ -65,28 +65,28 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv var rb1 = x in b1; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb2 = x in b2; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb3 = x in b3; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb4 = x in b4; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb5 = x in b5; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb6 = x in 0; ~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb7 = x in false; ~~~~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb8 = x in ''; ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. var rb9 = x in null; ~~~~ !!! error TS2531: Object is possibly 'null'. @@ -100,4 +100,4 @@ tests/cases/conformance/expressions/binaryOperators/inOperator/inOperatorWithInv ~~ !!! error TS2360: The left-hand side of an 'in' expression must be of type 'any', 'string', 'number', or 'symbol'. ~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/intTypeCheck.errors.txt b/tests/baselines/reference/intTypeCheck.errors.txt index f8b4fef7310..e5fbfbdbee8 100644 --- a/tests/baselines/reference/intTypeCheck.errors.txt +++ b/tests/baselines/reference/intTypeCheck.errors.txt @@ -14,26 +14,26 @@ tests/cases/compiler/intTypeCheck.ts(106,20): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(106,21): error TS2693: 'i1' only refers to a type, but is being used as a value here. tests/cases/compiler/intTypeCheck.ts(107,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(112,5): error TS2322: Type '{}' is not assignable to type 'i2'. - Type '{}' provides no match for the signature '(): any' + Type '{}' provides no match for the signature '(): any'. tests/cases/compiler/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' + Type 'Object' provides no match for the signature '(): any'. tests/cases/compiler/intTypeCheck.ts(114,17): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/intTypeCheck.ts(115,5): error TS2322: Type 'Base' is not assignable to type 'i2'. - Type 'Base' provides no match for the signature '(): any' + Type 'Base' provides no match for the signature '(): any'. tests/cases/compiler/intTypeCheck.ts(120,5): error TS2322: Type 'boolean' is not assignable to type 'i2'. tests/cases/compiler/intTypeCheck.ts(120,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(120,22): error TS2693: 'i2' only refers to a type, but is being used as a value here. tests/cases/compiler/intTypeCheck.ts(121,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(126,5): error TS2322: Type '{}' is not assignable to type 'i3'. - Type '{}' provides no match for the signature 'new (): any' + Type '{}' provides no match for the signature 'new (): any'. tests/cases/compiler/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' + Type 'Object' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(129,5): error TS2322: Type 'Base' is not assignable to type 'i3'. - Type 'Base' provides no match for the signature 'new (): any' + Type 'Base' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(131,5): error TS2322: Type '() => void' is not assignable to type 'i3'. - Type '() => void' provides no match for the signature 'new (): any' + Type '() => void' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(134,5): error TS2322: Type 'boolean' is not assignable to type 'i3'. tests/cases/compiler/intTypeCheck.ts(134,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(134,22): error TS2693: 'i3' only refers to a type, but is being used as a value here. @@ -58,13 +58,13 @@ tests/cases/compiler/intTypeCheck.ts(162,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(162,22): error TS2693: 'i5' only refers to a type, but is being used as a value here. tests/cases/compiler/intTypeCheck.ts(163,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(168,5): error TS2322: Type '{}' is not assignable to type 'i6'. - Type '{}' provides no match for the signature '(): any' + Type '{}' provides no match for the signature '(): any'. tests/cases/compiler/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' + Type 'Object' provides no match for the signature '(): any'. tests/cases/compiler/intTypeCheck.ts(170,17): error TS2350: Only a void function can be called with the 'new' keyword. tests/cases/compiler/intTypeCheck.ts(171,5): error TS2322: Type 'Base' is not assignable to type 'i6'. - Type 'Base' provides no match for the signature '(): any' + Type 'Base' provides no match for the signature '(): any'. tests/cases/compiler/intTypeCheck.ts(173,5): error TS2322: Type '() => void' is not assignable to type 'i6'. Type 'void' is not assignable to type 'number'. tests/cases/compiler/intTypeCheck.ts(176,5): error TS2322: Type 'boolean' is not assignable to type 'i6'. @@ -72,14 +72,14 @@ tests/cases/compiler/intTypeCheck.ts(176,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(176,22): error TS2693: 'i6' only refers to a type, but is being used as a value here. tests/cases/compiler/intTypeCheck.ts(177,17): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/intTypeCheck.ts(182,5): error TS2322: Type '{}' is not assignable to type 'i7'. - Type '{}' provides no match for the signature 'new (): any' + Type '{}' provides no match for the signature 'new (): any'. tests/cases/compiler/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' + Type 'Object' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(185,17): error TS2352: Type 'Base' cannot be converted to type 'i7'. - Type 'Base' provides no match for the signature 'new (): any' + Type 'Base' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(187,5): error TS2322: Type '() => void' is not assignable to type 'i7'. - Type '() => void' provides no match for the signature 'new (): any' + Type '() => void' provides no match for the signature 'new (): any'. tests/cases/compiler/intTypeCheck.ts(190,5): error TS2322: Type 'boolean' is not assignable to type 'i7'. tests/cases/compiler/intTypeCheck.ts(190,21): error TS1109: Expression expected. tests/cases/compiler/intTypeCheck.ts(190,22): error TS2693: 'i7' only refers to a type, but is being used as a value here. @@ -232,19 +232,19 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj12: i2 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i2'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any' +!!! 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' +!!! 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' +!!! 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() { }; @@ -266,22 +266,22 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj23: i3 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i3'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any' +!!! 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' +!!! 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' +!!! 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' +!!! 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; @@ -362,19 +362,19 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj56: i6 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i6'. -!!! error TS2322: Type '{}' provides no match for the signature '(): any' +!!! 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' +!!! 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' +!!! error TS2322: Type 'Base' provides no match for the signature '(): any'. var obj60: i6 = null; var obj61: i6 = function () { }; ~~~~~ @@ -399,22 +399,22 @@ tests/cases/compiler/intTypeCheck.ts(205,17): error TS2351: Cannot use 'new' wit var obj67: i7 = {}; ~~~~~ !!! error TS2322: Type '{}' is not assignable to type 'i7'. -!!! error TS2322: Type '{}' provides no match for the signature 'new (): any' +!!! 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' +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var obj69: i7 = new obj66; var obj70: i7 = new Base; ~~~~~~~~~~~~ !!! error TS2352: Type 'Base' cannot be converted to type 'i7'. -!!! error TS2352: Type 'Base' provides no match for the signature 'new (): any' +!!! 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' +!!! 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; diff --git a/tests/baselines/reference/interfaceImplementation1.errors.txt b/tests/baselines/reference/interfaceImplementation1.errors.txt index e5e1a212a06..9f061b6c5c0 100644 --- a/tests/baselines/reference/interfaceImplementation1.errors.txt +++ b/tests/baselines/reference/interfaceImplementation1.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2420: Class 'C1' tests/cases/compiler/interfaceImplementation1.ts(12,7): error TS2420: Class 'C1' incorrectly implements interface 'I2'. Property 'iFn' is private in type 'C1' but not in type 'I2'. tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2322: Type '() => C2' is not assignable to type 'I4'. - Type '() => C2' provides no match for the signature 'new (): I3' + Type '() => C2' provides no match for the signature 'new (): I3'. ==== tests/cases/compiler/interfaceImplementation1.ts (3 errors) ==== @@ -49,7 +49,7 @@ tests/cases/compiler/interfaceImplementation1.ts(34,5): error TS2322: Type '() = var a:I4 = function(){ ~ !!! error TS2322: Type '() => C2' is not assignable to type 'I4'. -!!! error TS2322: Type '() => C2' provides no match for the signature 'new (): I3' +!!! error TS2322: Type '() => C2' provides no match for the signature 'new (): I3'. return new C2(); } new a(); diff --git a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt index 902e4b448b5..1925079095a 100644 --- a/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt +++ b/tests/baselines/reference/interfacesWithPredefinedTypesAsNames.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(1,11): error TS2427: Interface name cannot be 'any' -tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(2,11): error TS2427: Interface name cannot be 'number' -tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(3,11): error TS2427: Interface name cannot be 'string' -tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(4,11): error TS2427: Interface name cannot be 'boolean' +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(1,11): error TS2427: Interface name cannot be 'any'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(2,11): error TS2427: Interface name cannot be 'number'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(3,11): error TS2427: Interface name cannot be 'string'. +tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(4,11): error TS2427: Interface name cannot be 'boolean'. tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,1): error TS2304: Cannot find name 'interface'. tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts(5,11): error TS1005: ';' expected. @@ -9,16 +9,16 @@ tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefine ==== tests/cases/conformance/interfaces/interfaceDeclarations/interfacesWithPredefinedTypesAsNames.ts (6 errors) ==== interface any { } ~~~ -!!! error TS2427: Interface name cannot be 'any' +!!! error TS2427: Interface name cannot be 'any'. interface number { } ~~~~~~ -!!! error TS2427: Interface name cannot be 'number' +!!! error TS2427: Interface name cannot be 'number'. interface string { } ~~~~~~ -!!! error TS2427: Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string'. interface boolean { } ~~~~~~~ -!!! error TS2427: Interface name cannot be 'boolean' +!!! error TS2427: Interface name cannot be 'boolean'. interface void {} ~~~~~~~~~ !!! error TS2304: Cannot find name 'interface'. diff --git a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 1292efd8a08..8aac049b344 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts(11,16): error TS2437: Module 'A' is hidden by a local declaration with the same name +tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts(11,16): error TS2437: Module 'A' is hidden by a local declaration with the same name. ==== tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferencingInstance.ts (1 errors) ==== @@ -14,6 +14,6 @@ tests/cases/compiler/internalImportInstantiatedModuleMergedWithClassNotReferenci var A = 1; import Y = A; ~ -!!! error TS2437: Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name. } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt index 5146966c3a4..fa7038fd49f 100644 --- a/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportInstantiatedModuleNotReferencingInstance.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts(8,16): error TS2437: Module 'A' is hidden by a local declaration with the same name +tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts(8,16): error TS2437: Module 'A' is hidden by a local declaration with the same name. ==== tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts (1 errors) ==== @@ -11,6 +11,6 @@ tests/cases/compiler/internalImportInstantiatedModuleNotReferencingInstance.ts(8 var A = 1; import Y = A; ~ -!!! error TS2437: Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name. } \ No newline at end of file diff --git a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt index 9f5cba24873..c744b629cae 100644 --- a/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt +++ b/tests/baselines/reference/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts(10,16): error TS2437: Module 'A' is hidden by a local declaration with the same name +tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts(10,16): error TS2437: Module 'A' is hidden by a local declaration with the same name. ==== tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferencingInstance.ts (1 errors) ==== @@ -13,6 +13,6 @@ tests/cases/compiler/internalImportUnInstantiatedModuleMergedWithClassNotReferen var A = 1; import Y = A; ~ -!!! error TS2437: Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name. } \ No newline at end of file diff --git a/tests/baselines/reference/invalidNestedModules.errors.txt b/tests/baselines/reference/invalidNestedModules.errors.txt index 1f9551a0f0b..93daeb6dd60 100644 --- a/tests/baselines/reference/invalidNestedModules.errors.txt +++ b/tests/baselines/reference/invalidNestedModules.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(1,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(17,18): error TS2300: Duplicate identifier 'Point'. tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts(24,20): error TS2300: Duplicate identifier 'Point'. @@ -6,7 +6,7 @@ tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules. ==== tests/cases/conformance/internalModules/moduleDeclarations/invalidNestedModules.ts (3 errors) ==== module A.B.C { ~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. export class Point { x: number; y: number; diff --git a/tests/baselines/reference/jsDocTypes.js b/tests/baselines/reference/jsDocTypes.js new file mode 100644 index 00000000000..a6df2f361c6 --- /dev/null +++ b/tests/baselines/reference/jsDocTypes.js @@ -0,0 +1,137 @@ +//// [tests/cases/conformance/salsa/jsDocTypes.ts] //// + +//// [a.js] + +/** @type {String} */ +var S; + +/** @type {string} */ +var s; + +/** @type {Number} */ +var N; + +/** @type {number} */ +var n; + +/** @type {Boolean} */ +var B; + +/** @type {boolean} */ +var b; + +/** @type {Void} */ +var V; + +/** @type {void} */ +var v; + +/** @type {Undefined} */ +var U; + +/** @type {undefined} */ +var u; + +/** @type {Null} */ +var Nl; + +/** @type {null} */ +var nl; + +/** @type {Array} */ +var A; + +/** @type {array} */ +var a; + +/** @type {Promise} */ +var P; + +/** @type {promise} */ +var p; + +/** @type {?number} */ +var nullable; + +/** @type {Object} */ +var Obj; + + + +//// [b.ts] +var S: string; +var s: string; +var N: number; +var n: number +var B: boolean; +var b: boolean; +var V :void; +var v: void; +var U: undefined; +var u: undefined; +var Nl: null; +var nl: null; +var A: any[]; +var a: any[]; +var P: Promise; +var p: Promise; +var nullable: number | null; +var Obj: any; + + +//// [a.js] +/** @type {String} */ +var S; +/** @type {string} */ +var s; +/** @type {Number} */ +var N; +/** @type {number} */ +var n; +/** @type {Boolean} */ +var B; +/** @type {boolean} */ +var b; +/** @type {Void} */ +var V; +/** @type {void} */ +var v; +/** @type {Undefined} */ +var U; +/** @type {undefined} */ +var u; +/** @type {Null} */ +var Nl; +/** @type {null} */ +var nl; +/** @type {Array} */ +var A; +/** @type {array} */ +var a; +/** @type {Promise} */ +var P; +/** @type {promise} */ +var p; +/** @type {?number} */ +var nullable; +/** @type {Object} */ +var Obj; +//// [b.js] +var S; +var s; +var N; +var n; +var B; +var b; +var V; +var v; +var U; +var u; +var Nl; +var nl; +var A; +var a; +var P; +var p; +var nullable; +var Obj; diff --git a/tests/baselines/reference/jsDocTypes.symbols b/tests/baselines/reference/jsDocTypes.symbols new file mode 100644 index 00000000000..9bde032cb44 --- /dev/null +++ b/tests/baselines/reference/jsDocTypes.symbols @@ -0,0 +1,133 @@ +=== tests/cases/conformance/salsa/a.js === + +/** @type {String} */ +var S; +>S : Symbol(S, Decl(a.js, 2, 3), Decl(b.ts, 0, 3)) + +/** @type {string} */ +var s; +>s : Symbol(s, Decl(a.js, 5, 3), Decl(b.ts, 1, 3)) + +/** @type {Number} */ +var N; +>N : Symbol(N, Decl(a.js, 8, 3), Decl(b.ts, 2, 3)) + +/** @type {number} */ +var n; +>n : Symbol(n, Decl(a.js, 11, 3), Decl(b.ts, 3, 3)) + +/** @type {Boolean} */ +var B; +>B : Symbol(B, Decl(a.js, 14, 3), Decl(b.ts, 4, 3)) + +/** @type {boolean} */ +var b; +>b : Symbol(b, Decl(a.js, 17, 3), Decl(b.ts, 5, 3)) + +/** @type {Void} */ +var V; +>V : Symbol(V, Decl(a.js, 20, 3), Decl(b.ts, 6, 3)) + +/** @type {void} */ +var v; +>v : Symbol(v, Decl(a.js, 23, 3), Decl(b.ts, 7, 3)) + +/** @type {Undefined} */ +var U; +>U : Symbol(U, Decl(a.js, 26, 3), Decl(b.ts, 8, 3)) + +/** @type {undefined} */ +var u; +>u : Symbol(u, Decl(a.js, 29, 3), Decl(b.ts, 9, 3)) + +/** @type {Null} */ +var Nl; +>Nl : Symbol(Nl, Decl(a.js, 32, 3), Decl(b.ts, 10, 3)) + +/** @type {null} */ +var nl; +>nl : Symbol(nl, Decl(a.js, 35, 3), Decl(b.ts, 11, 3)) + +/** @type {Array} */ +var A; +>A : Symbol(A, Decl(a.js, 38, 3), Decl(b.ts, 12, 3)) + +/** @type {array} */ +var a; +>a : Symbol(a, Decl(a.js, 41, 3), Decl(b.ts, 13, 3)) + +/** @type {Promise} */ +var P; +>P : Symbol(P, Decl(a.js, 44, 3), Decl(b.ts, 14, 3)) + +/** @type {promise} */ +var p; +>p : Symbol(p, Decl(a.js, 47, 3), Decl(b.ts, 15, 3)) + +/** @type {?number} */ +var nullable; +>nullable : Symbol(nullable, Decl(a.js, 50, 3), Decl(b.ts, 16, 3)) + +/** @type {Object} */ +var Obj; +>Obj : Symbol(Obj, Decl(a.js, 53, 3), Decl(b.ts, 17, 3)) + + + +=== tests/cases/conformance/salsa/b.ts === +var S: string; +>S : Symbol(S, Decl(a.js, 2, 3), Decl(b.ts, 0, 3)) + +var s: string; +>s : Symbol(s, Decl(a.js, 5, 3), Decl(b.ts, 1, 3)) + +var N: number; +>N : Symbol(N, Decl(a.js, 8, 3), Decl(b.ts, 2, 3)) + +var n: number +>n : Symbol(n, Decl(a.js, 11, 3), Decl(b.ts, 3, 3)) + +var B: boolean; +>B : Symbol(B, Decl(a.js, 14, 3), Decl(b.ts, 4, 3)) + +var b: boolean; +>b : Symbol(b, Decl(a.js, 17, 3), Decl(b.ts, 5, 3)) + +var V :void; +>V : Symbol(V, Decl(a.js, 20, 3), Decl(b.ts, 6, 3)) + +var v: void; +>v : Symbol(v, Decl(a.js, 23, 3), Decl(b.ts, 7, 3)) + +var U: undefined; +>U : Symbol(U, Decl(a.js, 26, 3), Decl(b.ts, 8, 3)) + +var u: undefined; +>u : Symbol(u, Decl(a.js, 29, 3), Decl(b.ts, 9, 3)) + +var Nl: null; +>Nl : Symbol(Nl, Decl(a.js, 32, 3), Decl(b.ts, 10, 3)) + +var nl: null; +>nl : Symbol(nl, Decl(a.js, 35, 3), Decl(b.ts, 11, 3)) + +var A: any[]; +>A : Symbol(A, Decl(a.js, 38, 3), Decl(b.ts, 12, 3)) + +var a: any[]; +>a : Symbol(a, Decl(a.js, 41, 3), Decl(b.ts, 13, 3)) + +var P: Promise; +>P : Symbol(P, Decl(a.js, 44, 3), Decl(b.ts, 14, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --)) + +var p: Promise; +>p : Symbol(p, Decl(a.js, 47, 3), Decl(b.ts, 15, 3)) +>Promise : Symbol(Promise, Decl(lib.d.ts, --, --)) + +var nullable: number | null; +>nullable : Symbol(nullable, Decl(a.js, 50, 3), Decl(b.ts, 16, 3)) + +var Obj: any; +>Obj : Symbol(Obj, Decl(a.js, 53, 3), Decl(b.ts, 17, 3)) + diff --git a/tests/baselines/reference/jsDocTypes.types b/tests/baselines/reference/jsDocTypes.types new file mode 100644 index 00000000000..c0214edf627 --- /dev/null +++ b/tests/baselines/reference/jsDocTypes.types @@ -0,0 +1,136 @@ +=== tests/cases/conformance/salsa/a.js === + +/** @type {String} */ +var S; +>S : string + +/** @type {string} */ +var s; +>s : string + +/** @type {Number} */ +var N; +>N : number + +/** @type {number} */ +var n; +>n : number + +/** @type {Boolean} */ +var B; +>B : boolean + +/** @type {boolean} */ +var b; +>b : boolean + +/** @type {Void} */ +var V; +>V : void + +/** @type {void} */ +var v; +>v : void + +/** @type {Undefined} */ +var U; +>U : undefined + +/** @type {undefined} */ +var u; +>u : undefined + +/** @type {Null} */ +var Nl; +>Nl : null + +/** @type {null} */ +var nl; +>nl : null + +/** @type {Array} */ +var A; +>A : any[] + +/** @type {array} */ +var a; +>a : any[] + +/** @type {Promise} */ +var P; +>P : Promise + +/** @type {promise} */ +var p; +>p : Promise + +/** @type {?number} */ +var nullable; +>nullable : number | null + +/** @type {Object} */ +var Obj; +>Obj : any + + + +=== tests/cases/conformance/salsa/b.ts === +var S: string; +>S : string + +var s: string; +>s : string + +var N: number; +>N : number + +var n: number +>n : number + +var B: boolean; +>B : boolean + +var b: boolean; +>b : boolean + +var V :void; +>V : void + +var v: void; +>v : void + +var U: undefined; +>U : undefined + +var u: undefined; +>u : undefined + +var Nl: null; +>Nl : null +>null : null + +var nl: null; +>nl : null +>null : null + +var A: any[]; +>A : any[] + +var a: any[]; +>a : any[] + +var P: Promise; +>P : Promise +>Promise : Promise + +var p: Promise; +>p : Promise +>Promise : Promise + +var nullable: number | null; +>nullable : number | null +>null : null + +var Obj: any; +>Obj : any + diff --git a/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt b/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt index c7d2ad270be..48bf64ac109 100644 --- a/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAbstractModifier.errors.txt @@ -1,11 +1,11 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,1): error TS8009: 'abstract' can only be used in a .ts file. tests/cases/compiler/a.js(2,5): error TS8009: 'abstract' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (2 errors) ==== abstract class c { ~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt index 039834ff702..75451b15389 100644 --- a/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationAmbientVarDeclarationSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,1): error TS8009: 'declare' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== declare var v; ~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt b/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt index 3cc2f5f085f..d681cec3775 100644 --- a/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt +++ b/tests/baselines/reference/jsFileCompilationBindStrictModeErrors.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/a.js(5,5): error TS1117: An object literal cannot have multiple properties with the same name in strict mode. -tests/cases/compiler/a.js(7,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/compiler/a.js(7,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/a.js(8,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. tests/cases/compiler/a.js(10,10): error TS1100: Invalid use of 'eval' in strict mode. tests/cases/compiler/a.js(12,10): error TS1100: Invalid use of 'arguments' in strict mode. @@ -23,7 +23,7 @@ tests/cases/compiler/d.js(2,11): error TS1005: ',' expected. }; var let = 10; // error ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. delete a; // error ~ !!! error TS1102: 'delete' cannot be called on an identifier in strict mode. diff --git a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt index 75bcf88b10a..234c9156cc1 100644 --- a/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEmitBlockedCorrectly.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. !!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt index c6da8931d5e..85d3b5ef798 100644 --- a/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationEnumSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,6): error TS8015: 'enum declarations' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== enum E { } ~ diff --git a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 54e91c5d196..c9937ecd359 100644 --- a/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationErrorOnDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,11 +1,11 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. error TS5055: Cannot write file 'tests/cases/compiler/c.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. !!! error TS5055: Cannot write file 'tests/cases/compiler/c.js' 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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt index babbeea8004..e3df8cf5d94 100644 --- a/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationExportAssignmentSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,1): error TS8003: 'export=' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== export = b; ~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt index 3b30663308f..95e967401a8 100644 --- a/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationHeritageClauseSyntaxOfClass.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,9): error TS8005: 'implements clauses' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== class C implements D { } ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt index a064f53e92f..d6d0ce64d44 100644 --- a/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationImportEqualsSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,1): error TS8002: 'import ... =' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== import a = b; ~~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt index 9e53438c732..be051cafc86 100644 --- a/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationInterfaceSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,11): error TS8006: 'interface declarations' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== interface I { } ~ diff --git a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt index 6952c0055c0..cd0bd8ef91a 100644 --- a/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationModuleSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,8): error TS8007: 'module declarations' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== module M { } ~ diff --git a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt index 888310414f2..fef38ae7549 100644 --- a/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationNoErrorWithoutDeclarationsWithJsFileReferenceWithNoOut.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/c.js' 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 + 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 'tests/cases/compiler/c.js' 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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt index 15bfe2281d9..a340f3d6d1b 100644 --- a/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationOptionalParameter.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,13): error TS8009: '?' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== function F(p?) { } ~ diff --git a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt index af95c136205..2f2cccf83d8 100644 --- a/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicMethodSyntaxOfClass.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(2,5): error TS8009: 'public' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== class C { public foo() { diff --git a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt index 9314e1da807..6f266b7df31 100644 --- a/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt +++ b/tests/baselines/reference/jsFileCompilationPublicParameterModifier.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,23): error TS8012: 'parameter modifiers' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== class C { constructor(public x) { }} ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types index c420454b8cf..f40e9164c38 100644 --- a/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types +++ b/tests/baselines/reference/jsFileCompilationRestParamJsDocFunction.types @@ -11,8 +11,8 @@ * @returns {*} Returns the result of `func`. */ function apply(func, thisArg, args) { ->apply : (func: Function, thisArg: any, ...args: any[]) => any ->func : Function +>apply : (func: {}, thisArg: any, ...args: any[]) => any +>func : {} >thisArg : any >args : any[] @@ -29,7 +29,7 @@ function apply(func, thisArg, args) { >0 : 0 >func.call(thisArg) : any >func.call : (this: Function, thisArg: any, ...argArray: any[]) => any ->func : Function +>func : {} >call : (this: Function, thisArg: any, ...argArray: any[]) => any >thisArg : any @@ -37,7 +37,7 @@ function apply(func, thisArg, args) { >1 : 1 >func.call(thisArg, args[0]) : any >func.call : (this: Function, thisArg: any, ...argArray: any[]) => any ->func : Function +>func : {} >call : (this: Function, thisArg: any, ...argArray: any[]) => any >thisArg : any >args[0] : any @@ -48,7 +48,7 @@ function apply(func, thisArg, args) { >2 : 2 >func.call(thisArg, args[0], args[1]) : any >func.call : (this: Function, thisArg: any, ...argArray: any[]) => any ->func : Function +>func : {} >call : (this: Function, thisArg: any, ...argArray: any[]) => any >thisArg : any >args[0] : any @@ -62,7 +62,7 @@ function apply(func, thisArg, args) { >3 : 3 >func.call(thisArg, args[0], args[1], args[2]) : any >func.call : (this: Function, thisArg: any, ...argArray: any[]) => any ->func : Function +>func : {} >call : (this: Function, thisArg: any, ...argArray: any[]) => any >thisArg : any >args[0] : any @@ -78,12 +78,12 @@ function apply(func, thisArg, args) { return func.apply(thisArg, args); >func.apply(thisArg, args) : any >func.apply : (this: Function, thisArg: any, argArray?: any) => any ->func : Function +>func : {} >apply : (this: Function, thisArg: any, argArray?: any) => any >thisArg : any >args : any[] } export default apply; ->apply : (func: Function, thisArg: any, ...args: any[]) => any +>apply : (func: {}, thisArg: any, ...args: any[]) => any diff --git a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt index acae950d081..f43d221d6a9 100644 --- a/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationReturnTypeSyntaxOfFunction.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== function F(): number { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt index eb4c114d3d0..357f49f97bc 100644 --- a/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt +++ b/tests/baselines/reference/jsFileCompilationSyntaxError.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + 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 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (0 errors) ==== /** * @type {number} diff --git a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt index 74978eddf8c..dd7c1d858e6 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAliasSyntax.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,6): error TS8008: 'type aliases' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== type a = b; ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt index f53ec55d2b1..8d8a1a1a83e 100644 --- a/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeArgumentSyntaxOfCall.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,5): error TS8011: 'type arguments' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== Foo(); ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt index be1e6d32436..3ec792c79fe 100644 --- a/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeAssertions.errors.txt @@ -1,11 +1,11 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,10): error TS17008: JSX element 'string' has no corresponding closing tag. tests/cases/compiler/a.js(1,27): error TS1005: 'undefined; ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt index 811c0793ffe..754d83cff0c 100644 --- a/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeOfParameter.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,15): error TS8010: 'types' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== function F(a: number) { } ~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt index 0fe902aa661..7f27e1e8211 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfClass.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,9): error TS8004: 'type parameter declarations' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== class C { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt index bfc4c7be26a..12b53c41b97 100644 --- a/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeParameterSyntaxOfFunction.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,12): error TS8004: 'type parameter declarations' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== function F() { } ~ diff --git a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt index 65333751780..9c7dd647ca7 100644 --- a/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt +++ b/tests/baselines/reference/jsFileCompilationTypeSyntaxOfVar.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. tests/cases/compiler/a.js(1,8): error TS8010: 'types' can only be used in a .ts file. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. ==== tests/cases/compiler/a.js (1 errors) ==== var v: () => number; ~~~~~~~~~~~~ diff --git a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt index 4170e818fd7..b44d0752512 100644 --- a/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithDeclarationEmitPathSameAsInput.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/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 + 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 'tests/cases/compiler/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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt index 8004efd02ef..b00b55304e1 100644 --- a/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithJsEmitPathSameAsInput.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. !!! error TS5055: Cannot write file 'tests/cases/compiler/a.js' 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 +!!! 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. !!! error TS5056: Cannot write file 'tests/cases/compiler/a.js' because it would be overwritten by multiple input files. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt index 069c562f29b..84dfd78e6a3 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJs.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 +!!! 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. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt index 069c562f29b..84dfd78e6a3 100644 --- a/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithMapFileAsJsWithInlineSourceMap.errors.txt @@ -1,10 +1,10 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. !!! error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 +!!! 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. !!! error TS6054: File 'tests/cases/compiler/b.js.map' has unsupported extension. The only supported extensions are '.ts', '.tsx', '.d.ts', '.js', '.jsx'. ==== tests/cases/compiler/a.ts (0 errors) ==== diff --git a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt index 0a4f0cdf1a4..e10ec91b4c5 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutDeclarationFileNameSameAsInputJsFile.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.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 + 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 'tests/cases/compiler/b.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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt index 3f72a8113ef..06df925215b 100644 --- a/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithOutFileNameSameAsInputJsFile.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 + 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 'tests/cases/compiler/b.js' 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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt index 3f72a8113ef..06df925215b 100644 --- a/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt +++ b/tests/baselines/reference/jsFileCompilationWithoutOut.errors.txt @@ -1,9 +1,9 @@ error TS5055: Cannot write file 'tests/cases/compiler/b.js' 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 + 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 'tests/cases/compiler/b.js' 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 +!!! 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. ==== tests/cases/compiler/a.ts (0 errors) ==== class c { } diff --git a/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt b/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt index 23b14a25cd2..77f83ccbd36 100644 --- a/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt +++ b/tests/baselines/reference/jsxEsprimaFbTestSuite.errors.txt @@ -5,7 +5,7 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,29): error TS1005: '{' tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,57): error TS1109: Expression expected. tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(39,58): error TS1109: Expression expected. tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(41,1): error TS1003: Identifier expected. -tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(41,12): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(41,12): error TS2657: JSX expressions must have one parent element. ==== tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx (8 errors) ==== @@ -65,7 +65,7 @@ tests/cases/conformance/jsx/jsxEsprimaFbTestSuite.tsx(41,12): error TS2657: JSX ~ !!! error TS1003: Identifier expected. ~ -!!! error TS2657: JSX expressions must have one parent element +!!! error TS2657: JSX expressions must have one parent element. ; diff --git a/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt b/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt index 4b415154c6b..8af8f5033ba 100644 --- a/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt +++ b/tests/baselines/reference/jsxInvalidEsprimaTestSuite.errors.txt @@ -17,7 +17,7 @@ tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(8,4): error TS17002: tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(9,13): error TS1002: Unterminated string literal. tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(10,1): error TS1003: Identifier expected. tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(10,6): error TS17002: Expected corresponding JSX closing tag for 'a'. -tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(10,10): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(10,10): error TS2657: JSX expressions must have one parent element. tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(11,3): error TS1003: Identifier expected. tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(11,5): error TS1003: Identifier expected. tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(11,11): error TS1005: '>' expected. @@ -120,7 +120,7 @@ tests/cases/conformance/jsx/jsxInvalidEsprimaTestSuite.tsx(35,21): error TS1005: ~~~~ !!! error TS17002: Expected corresponding JSX closing tag for 'a'. ~ -!!! error TS2657: JSX expressions must have one parent element +!!! error TS2657: JSX expressions must have one parent element. ; ~ !!! error TS1003: Identifier expected. diff --git a/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt b/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt index 42f71669c66..e5812e46bf9 100644 --- a/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt +++ b/tests/baselines/reference/letAsIdentifierInStrictMode.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/letAsIdentifierInStrictMode.ts(2,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/compiler/letAsIdentifierInStrictMode.ts(2,5): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/letAsIdentifierInStrictMode.ts(3,5): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/letAsIdentifierInStrictMode.ts(4,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/compiler/letAsIdentifierInStrictMode.ts(4,1): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/letAsIdentifierInStrictMode.ts(6,1): error TS2300: Duplicate identifier 'a'. @@ -8,13 +8,13 @@ tests/cases/compiler/letAsIdentifierInStrictMode.ts(6,1): error TS2300: Duplicat "use strict"; var let = 10; ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. var a = 10; ~ !!! error TS2300: Duplicate identifier 'a'. let = 30; ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. let a; ~ diff --git a/tests/baselines/reference/library-reference-1.trace.json b/tests/baselines/reference/library-reference-1.trace.json index d13ac9da455..b09781aa3f4 100644 --- a/tests/baselines/reference/library-reference-1.trace.json +++ b/tests/baselines/reference/library-reference-1.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "File 'types/jquery/package.json' does not exist.", "File 'types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'", + "Resolving real path for 'types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/types/jquery/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'jquery', containing file '/src/__inferred type names__.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "File 'types/jquery/package.json' does not exist.", "File 'types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'", + "Resolving real path for 'types/jquery/index.d.ts', result '/src/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-10.trace.json b/tests/baselines/reference/library-reference-10.trace.json index 760f0c5ec82..ada939d8129 100644 --- a/tests/baselines/reference/library-reference-10.trace.json +++ b/tests/baselines/reference/library-reference-10.trace.json @@ -1,16 +1,16 @@ [ "======== Resolving type reference directive 'jquery', containing file '/foo/consumer.ts', root directory './types'. ========", - "Resolving with primary search path './types'", + "Resolving with primary search path './types'.", "Found 'package.json' at './types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references 'types/jquery/jquery.d.ts'.", "File 'types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'", + "Resolving real path for 'types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/foo/types/jquery/jquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'jquery', containing file '/foo/__inferred type names__.ts', root directory './types'. ========", - "Resolving with primary search path './types'", + "Resolving with primary search path './types'.", "Found 'package.json' at './types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references 'types/jquery/jquery.d.ts'.", "File 'types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'", + "Resolving real path for 'types/jquery/jquery.d.ts', result '/foo/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/foo/types/jquery/jquery.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-11.trace.json b/tests/baselines/reference/library-reference-11.trace.json index 0393f04cc80..053dc497065 100644 --- a/tests/baselines/reference/library-reference-11.trace.json +++ b/tests/baselines/reference/library-reference-11.trace.json @@ -1,12 +1,12 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/a/b'", + "Looking up in 'node_modules' folder, initial location '/a/b'.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/a/node_modules/jquery/jquery.d.ts'.", "File '/a/node_modules/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/node_modules/jquery/jquery.d.ts', result '/a/node_modules/jquery/jquery.d.ts'", + "Resolving real path for '/a/node_modules/jquery/jquery.d.ts', result '/a/node_modules/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/node_modules/jquery/jquery.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-12.trace.json b/tests/baselines/reference/library-reference-12.trace.json index 75b53d589ee..d990709cac8 100644 --- a/tests/baselines/reference/library-reference-12.trace.json +++ b/tests/baselines/reference/library-reference-12.trace.json @@ -1,13 +1,13 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a/b/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/a/b'", + "Looking up in 'node_modules' folder, initial location '/a/b'.", "Directory '/a/b/node_modules' does not exist, skipping all lookups in it.", "File '/a/node_modules/jquery.d.ts' does not exist.", "Found 'package.json' at '/a/node_modules/jquery/package.json'.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'dist/jquery.d.ts' that references '/a/node_modules/jquery/dist/jquery.d.ts'.", "File '/a/node_modules/jquery/dist/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/node_modules/jquery/dist/jquery.d.ts', result '/a/node_modules/jquery/dist/jquery.d.ts'", + "Resolving real path for '/a/node_modules/jquery/dist/jquery.d.ts', result '/a/node_modules/jquery/dist/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/node_modules/jquery/dist/jquery.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-13.trace.json b/tests/baselines/reference/library-reference-13.trace.json index 338cefbc47e..70ebb875899 100644 --- a/tests/baselines/reference/library-reference-13.trace.json +++ b/tests/baselines/reference/library-reference-13.trace.json @@ -1,8 +1,8 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a/__inferred type names__.ts', root directory '/a/types'. ========", - "Resolving with primary search path '/a/types'", + "Resolving with primary search path '/a/types'.", "File '/a/types/jquery/package.json' does not exist.", "File '/a/types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'", + "Resolving real path for '/a/types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-14.trace.json b/tests/baselines/reference/library-reference-14.trace.json index 338cefbc47e..70ebb875899 100644 --- a/tests/baselines/reference/library-reference-14.trace.json +++ b/tests/baselines/reference/library-reference-14.trace.json @@ -1,8 +1,8 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a/__inferred type names__.ts', root directory '/a/types'. ========", - "Resolving with primary search path '/a/types'", + "Resolving with primary search path '/a/types'.", "File '/a/types/jquery/package.json' does not exist.", "File '/a/types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/a/types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'", + "Resolving real path for '/a/types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-15.trace.json b/tests/baselines/reference/library-reference-15.trace.json index 6d8b5cf1408..0f76cf52984 100644 --- a/tests/baselines/reference/library-reference-15.trace.json +++ b/tests/baselines/reference/library-reference-15.trace.json @@ -1,8 +1,8 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a/__inferred type names__.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "File 'types/jquery/package.json' does not exist.", "File 'types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'", + "Resolving real path for 'types/jquery/index.d.ts', result '/a/types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/a/types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-2.trace.json b/tests/baselines/reference/library-reference-2.trace.json index ef0936a35a2..e708d11c464 100644 --- a/tests/baselines/reference/library-reference-2.trace.json +++ b/tests/baselines/reference/library-reference-2.trace.json @@ -1,18 +1,18 @@ [ "======== Resolving type reference directive 'jquery', containing file '/consumer.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "Found 'package.json' at '/types/jquery/package.json'.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'jquery.d.ts' that references '/types/jquery/jquery.d.ts'.", "File '/types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/jquery/jquery.d.ts', result '/types/jquery/jquery.d.ts'", + "Resolving real path for '/types/jquery/jquery.d.ts', result '/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/types/jquery/jquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'jquery', containing file 'test/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "Found 'package.json' at '/types/jquery/package.json'.", "'package.json' does not have a 'typings' field.", "'package.json' has 'types' field 'jquery.d.ts' that references '/types/jquery/jquery.d.ts'.", "File '/types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/jquery/jquery.d.ts', result '/types/jquery/jquery.d.ts'", + "Resolving real path for '/types/jquery/jquery.d.ts', result '/types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/types/jquery/jquery.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-3.trace.json b/tests/baselines/reference/library-reference-3.trace.json index d672eb50de8..22747738c10 100644 --- a/tests/baselines/reference/library-reference-3.trace.json +++ b/tests/baselines/reference/library-reference-3.trace.json @@ -1,10 +1,10 @@ [ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/src'", + "Looking up in 'node_modules' folder, initial location '/src'.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/src/node_modules/jquery/index.d.ts', result '/src/node_modules/jquery/index.d.ts'", + "Resolving real path for '/src/node_modules/jquery/index.d.ts', result '/src/node_modules/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-4.trace.json b/tests/baselines/reference/library-reference-4.trace.json index b6b9e5e0af2..03fdfa0e863 100644 --- a/tests/baselines/reference/library-reference-4.trace.json +++ b/tests/baselines/reference/library-reference-4.trace.json @@ -1,36 +1,36 @@ [ "======== Resolving type reference directive 'foo', containing file '/src/root.ts', root directory '/src'. ========", - "Resolving with primary search path '/src'", - "Looking up in 'node_modules' folder, initial location '/src'", + "Resolving with primary search path '/src'.", + "Looking up in 'node_modules' folder, initial location '/src'.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/foo/index.d.ts', result '/node_modules/foo/index.d.ts'", + "Resolving real path for '/node_modules/foo/index.d.ts', result '/node_modules/foo/index.d.ts'.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory '/src'. ========", - "Resolving with primary search path '/src'", - "Looking up in 'node_modules' folder, initial location '/src'", + "Resolving with primary search path '/src'.", + "Looking up in 'node_modules' folder, initial location '/src'.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/bar/index.d.ts', result '/node_modules/bar/index.d.ts'", + "Resolving real path for '/node_modules/bar/index.d.ts', result '/node_modules/bar/index.d.ts'.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory '/src'. ========", - "Resolving with primary search path '/src'", - "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", + "Resolving with primary search path '/src'.", + "Looking up in 'node_modules' folder, initial location '/node_modules/foo'.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/foo/node_modules/alpha/index.d.ts', result '/node_modules/foo/node_modules/alpha/index.d.ts'", + "Resolving real path for '/node_modules/foo/node_modules/alpha/index.d.ts', result '/node_modules/foo/node_modules/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory '/src'. ========", - "Resolving with primary search path '/src'", - "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", + "Resolving with primary search path '/src'.", + "Looking up in 'node_modules' folder, initial location '/node_modules/bar'.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/bar/node_modules/alpha/index.d.ts', result '/node_modules/bar/node_modules/alpha/index.d.ts'", + "Resolving real path for '/node_modules/bar/node_modules/alpha/index.d.ts', result '/node_modules/bar/node_modules/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-5.trace.json b/tests/baselines/reference/library-reference-5.trace.json index 818fceb42cf..cb14078670a 100644 --- a/tests/baselines/reference/library-reference-5.trace.json +++ b/tests/baselines/reference/library-reference-5.trace.json @@ -1,40 +1,40 @@ [ "======== Resolving type reference directive 'foo', containing file '/src/root.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "Directory 'types' does not exist, skipping all lookups in it.", - "Looking up in 'node_modules' folder, initial location '/src'", + "Looking up in 'node_modules' folder, initial location '/src'.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", "File '/node_modules/foo.d.ts' does not exist.", "File '/node_modules/foo/package.json' does not exist.", "File '/node_modules/foo/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/foo/index.d.ts', result '/node_modules/foo/index.d.ts'", + "Resolving real path for '/node_modules/foo/index.d.ts', result '/node_modules/foo/index.d.ts'.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/foo/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'bar', containing file '/src/root.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "Directory 'types' does not exist, skipping all lookups in it.", - "Looking up in 'node_modules' folder, initial location '/src'", + "Looking up in 'node_modules' folder, initial location '/src'.", "Directory '/src/node_modules' does not exist, skipping all lookups in it.", "File '/node_modules/bar.d.ts' does not exist.", "File '/node_modules/bar/package.json' does not exist.", "File '/node_modules/bar/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/bar/index.d.ts', result '/node_modules/bar/index.d.ts'", + "Resolving real path for '/node_modules/bar/index.d.ts', result '/node_modules/bar/index.d.ts'.", "======== Type reference directive 'bar' was successfully resolved to '/node_modules/bar/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/foo/index.d.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "Directory 'types' does not exist, skipping all lookups in it.", - "Looking up in 'node_modules' folder, initial location '/node_modules/foo'", + "Looking up in 'node_modules' folder, initial location '/node_modules/foo'.", "File '/node_modules/foo/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/foo/node_modules/alpha/package.json' does not exist.", "File '/node_modules/foo/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/foo/node_modules/alpha/index.d.ts', result '/node_modules/foo/node_modules/alpha/index.d.ts'", + "Resolving real path for '/node_modules/foo/node_modules/alpha/index.d.ts', result '/node_modules/foo/node_modules/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/foo/node_modules/alpha/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'alpha', containing file '/node_modules/bar/index.d.ts', root directory 'types'. ========", - "Resolving with primary search path 'types'", + "Resolving with primary search path 'types'.", "Directory 'types' does not exist, skipping all lookups in it.", - "Looking up in 'node_modules' folder, initial location '/node_modules/bar'", + "Looking up in 'node_modules' folder, initial location '/node_modules/bar'.", "File '/node_modules/bar/node_modules/alpha.d.ts' does not exist.", "File '/node_modules/bar/node_modules/alpha/package.json' does not exist.", "File '/node_modules/bar/node_modules/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/bar/node_modules/alpha/index.d.ts', result '/node_modules/bar/node_modules/alpha/index.d.ts'", + "Resolving real path for '/node_modules/bar/node_modules/alpha/index.d.ts', result '/node_modules/bar/node_modules/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/bar/node_modules/alpha/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-6.trace.json b/tests/baselines/reference/library-reference-6.trace.json index 6ca81a6c418..3c682db6af7 100644 --- a/tests/baselines/reference/library-reference-6.trace.json +++ b/tests/baselines/reference/library-reference-6.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'alpha', containing file '/src/foo.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/alpha/package.json' does not exist.", "File '/node_modules/@types/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/alpha/index.d.ts', result '/node_modules/@types/alpha/index.d.ts'", + "Resolving real path for '/node_modules/@types/alpha/index.d.ts', result '/node_modules/@types/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/@types/alpha/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'alpha', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/alpha/package.json' does not exist.", "File '/node_modules/@types/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/alpha/index.d.ts', result '/node_modules/@types/alpha/index.d.ts'", + "Resolving real path for '/node_modules/@types/alpha/index.d.ts', result '/node_modules/@types/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/node_modules/@types/alpha/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-7.trace.json b/tests/baselines/reference/library-reference-7.trace.json index d672eb50de8..22747738c10 100644 --- a/tests/baselines/reference/library-reference-7.trace.json +++ b/tests/baselines/reference/library-reference-7.trace.json @@ -1,10 +1,10 @@ [ "======== Resolving type reference directive 'jquery', containing file '/src/consumer.ts', root directory not set. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/src'", + "Looking up in 'node_modules' folder, initial location '/src'.", "File '/src/node_modules/jquery.d.ts' does not exist.", "File '/src/node_modules/jquery/package.json' does not exist.", "File '/src/node_modules/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/src/node_modules/jquery/index.d.ts', result '/src/node_modules/jquery/index.d.ts'", + "Resolving real path for '/src/node_modules/jquery/index.d.ts', result '/src/node_modules/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/src/node_modules/jquery/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/library-reference-8.trace.json b/tests/baselines/reference/library-reference-8.trace.json index 905c3c2bb36..794df2daa7a 100644 --- a/tests/baselines/reference/library-reference-8.trace.json +++ b/tests/baselines/reference/library-reference-8.trace.json @@ -1,38 +1,38 @@ [ "======== Resolving type reference directive 'alpha', containing file '/test/foo.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/alpha/package.json' does not exist.", "File '/test/types/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'", + "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/test/types/alpha/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'beta', containing file '/test/foo.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/beta/package.json' does not exist.", "File '/test/types/beta/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'", + "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'.", "======== Type reference directive 'beta' was successfully resolved to '/test/types/beta/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'beta', containing file '/test/types/alpha/index.d.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/beta/package.json' does not exist.", "File '/test/types/beta/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'", + "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'.", "======== Type reference directive 'beta' was successfully resolved to '/test/types/beta/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'alpha', containing file '/test/types/beta/index.d.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/alpha/package.json' does not exist.", "File '/test/types/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'", + "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/test/types/alpha/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'alpha', containing file '/test/__inferred type names__.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/alpha/package.json' does not exist.", "File '/test/types/alpha/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'", + "Resolving real path for '/test/types/alpha/index.d.ts', result '/test/types/alpha/index.d.ts'.", "======== Type reference directive 'alpha' was successfully resolved to '/test/types/alpha/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'beta', containing file '/test/__inferred type names__.ts', root directory '/test/types'. ========", - "Resolving with primary search path '/test/types'", + "Resolving with primary search path '/test/types'.", "File '/test/types/beta/package.json' does not exist.", "File '/test/types/beta/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'", + "Resolving real path for '/test/types/beta/index.d.ts', result '/test/types/beta/index.d.ts'.", "======== Type reference directive 'beta' was successfully resolved to '/test/types/beta/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json index eeff8b42ce6..46f03d1e8c4 100644 --- a/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json +++ b/tests/baselines/reference/maxNodeModuleJsDepthDefaultsToZero.trace.json @@ -15,6 +15,6 @@ "File '/node_modules/shortid.jsx' does not exist.", "File '/node_modules/shortid/package.json' does not exist.", "File '/node_modules/shortid/index.js' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/shortid/index.js', result '/node_modules/shortid/index.js'", + "Resolving real path for '/node_modules/shortid/index.js', result '/node_modules/shortid/index.js'.", "======== Module name 'shortid' was successfully resolved to '/node_modules/shortid/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/misspelledNewMetaProperty.errors.txt b/tests/baselines/reference/misspelledNewMetaProperty.errors.txt new file mode 100644 index 00000000000..429a40a5b80 --- /dev/null +++ b/tests/baselines/reference/misspelledNewMetaProperty.errors.txt @@ -0,0 +1,7 @@ +tests/cases/compiler/misspelledNewMetaProperty.ts(1,20): error TS17012: 'targ' is not a valid meta-property for keyword 'new'. Did you mean 'target'? + + +==== tests/cases/compiler/misspelledNewMetaProperty.ts (1 errors) ==== + function foo(){new.targ} + ~~~~ +!!! error TS17012: 'targ' is not a valid meta-property for keyword 'new'. Did you mean 'target'? \ No newline at end of file diff --git a/tests/baselines/reference/misspelledNewMetaProperty.js b/tests/baselines/reference/misspelledNewMetaProperty.js new file mode 100644 index 00000000000..964cf91d52c --- /dev/null +++ b/tests/baselines/reference/misspelledNewMetaProperty.js @@ -0,0 +1,5 @@ +//// [misspelledNewMetaProperty.ts] +function foo(){new.targ} + +//// [misspelledNewMetaProperty.js] +function foo() { new.targ; } diff --git a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json index 50e3cccad9c..104853f8aa3 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions.trace.json @@ -10,7 +10,7 @@ "File '/src/a.js.ts' does not exist.", "File '/src/a.js.tsx' does not exist.", "File '/src/a.js.d.ts' does not exist.", - "File name '/src/a.js' has a '.js' extension - stripping it", + "File name '/src/a.js' has a '.js' extension - stripping it.", "File '/src/a.ts' exist - use it as a name resolution result.", "======== Module name './a.js' was successfully resolved to '/src/a.ts'. ========", "======== Resolving module './jquery.js' from '/src/jquery_user_1.ts'. ========", @@ -19,7 +19,7 @@ "File '/src/jquery.js.ts' does not exist.", "File '/src/jquery.js.tsx' does not exist.", "File '/src/jquery.js.d.ts' does not exist.", - "File name '/src/jquery.js' has a '.js' extension - stripping it", + "File name '/src/jquery.js' has a '.js' extension - stripping it.", "File '/src/jquery.ts' does not exist.", "File '/src/jquery.tsx' does not exist.", "File '/src/jquery.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json index e550bb41eab..3632a5c2242 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_unexpected2.trace.json @@ -14,7 +14,7 @@ "File '/node_modules/foo/foo.js.ts' does not exist.", "File '/node_modules/foo/foo.js.tsx' does not exist.", "File '/node_modules/foo/foo.js.d.ts' does not exist.", - "File name '/node_modules/foo/foo.js' has a '.js' extension - stripping it", + "File name '/node_modules/foo/foo.js' has a '.js' extension - stripping it.", "File '/node_modules/foo/foo.ts' does not exist.", "File '/node_modules/foo/foo.tsx' does not exist.", "File '/node_modules/foo/foo.d.ts' does not exist.", diff --git a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json index c01ba494886..6cfdb8b567e 100644 --- a/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json +++ b/tests/baselines/reference/moduleResolutionWithExtensions_withAmbientPresent.trace.json @@ -15,6 +15,6 @@ "File '/node_modules/js.jsx' does not exist.", "File '/node_modules/js/package.json' does not exist.", "File '/node_modules/js/index.js' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/js/index.js', result '/node_modules/js/index.js'", + "Resolving real path for '/node_modules/js/index.js', result '/node_modules/js/index.js'.", "======== Module name 'js' was successfully resolved to '/node_modules/js/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json index 1b21293fc05..2dd33953680 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks.trace.json @@ -25,6 +25,6 @@ "File '/src/library-b/node_modules/library-a.d.ts' does not exist.", "File '/src/library-b/node_modules/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/library-a/index.ts' exist - use it as a name resolution result.", - "Resolving real path for '/src/library-b/node_modules/library-a/index.ts', result '/src/library-a/index.ts'", + "Resolving real path for '/src/library-b/node_modules/library-a/index.ts', result '/src/library-a/index.ts'.", "======== Module name 'library-a' was successfully resolved to '/src/library-a/index.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.trace.json index 78d169457ee..65d89ed7458 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_referenceTypes.trace.json @@ -1,29 +1,29 @@ [ "======== Resolving type reference directive 'library-a', containing file '/app.ts', root directory ''. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/'", + "Looking up in 'node_modules' folder, initial location '/'.", "File '/node_modules/library-a.d.ts' does not exist.", "File '/node_modules/@types/library-a.d.ts' does not exist.", "File '/node_modules/@types/library-a/package.json' does not exist.", "File '/node_modules/@types/library-a/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/library-a/index.d.ts', result '/node_modules/@types/library-a/index.d.ts'", + "Resolving real path for '/node_modules/@types/library-a/index.d.ts', result '/node_modules/@types/library-a/index.d.ts'.", "======== Type reference directive 'library-a' was successfully resolved to '/node_modules/@types/library-a/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'library-b', containing file '/app.ts', root directory ''. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/'", + "Looking up in 'node_modules' folder, initial location '/'.", "File '/node_modules/library-b.d.ts' does not exist.", "File '/node_modules/@types/library-b.d.ts' does not exist.", "File '/node_modules/@types/library-b/package.json' does not exist.", "File '/node_modules/@types/library-b/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/library-b/index.d.ts', result '/node_modules/@types/library-b/index.d.ts'", + "Resolving real path for '/node_modules/@types/library-b/index.d.ts', result '/node_modules/@types/library-b/index.d.ts'.", "======== Type reference directive 'library-b' was successfully resolved to '/node_modules/@types/library-b/index.d.ts', primary: false. ========", "======== Resolving type reference directive 'library-a', containing file '/node_modules/@types/library-b/index.d.ts', root directory ''. ========", "Root directory cannot be determined, skipping primary search paths.", - "Looking up in 'node_modules' folder, initial location '/node_modules/@types/library-b'", + "Looking up in 'node_modules' folder, initial location '/node_modules/@types/library-b'.", "File '/node_modules/@types/library-b/node_modules/library-a.d.ts' does not exist.", "File '/node_modules/@types/library-b/node_modules/@types/library-a.d.ts' does not exist.", "File '/node_modules/@types/library-b/node_modules/@types/library-a/package.json' does not exist.", "File '/node_modules/@types/library-b/node_modules/@types/library-a/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/library-b/node_modules/@types/library-a/index.d.ts', result '/node_modules/@types/library-a/index.d.ts'", + "Resolving real path for '/node_modules/@types/library-b/node_modules/@types/library-a/index.d.ts', result '/node_modules/@types/library-a/index.d.ts'.", "======== Type reference directive 'library-a' was successfully resolved to '/node_modules/@types/library-a/index.d.ts', primary: false. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.trace.json b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.trace.json index 1b21293fc05..2dd33953680 100644 --- a/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.trace.json +++ b/tests/baselines/reference/moduleResolutionWithSymlinks_withOutDir.trace.json @@ -25,6 +25,6 @@ "File '/src/library-b/node_modules/library-a.d.ts' does not exist.", "File '/src/library-b/node_modules/library-a/package.json' does not exist.", "File '/src/library-b/node_modules/library-a/index.ts' exist - use it as a name resolution result.", - "Resolving real path for '/src/library-b/node_modules/library-a/index.ts', result '/src/library-a/index.ts'", + "Resolving real path for '/src/library-b/node_modules/library-a/index.ts', result '/src/library-a/index.ts'.", "======== Module name 'library-a' was successfully resolved to '/src/library-a/index.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/multipleExports.errors.txt b/tests/baselines/reference/multipleExports.errors.txt index 430b8618daf..43e9c4bffa3 100644 --- a/tests/baselines/reference/multipleExports.errors.txt +++ b/tests/baselines/reference/multipleExports.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/multipleExports.ts(10,5): error TS1194: Export declarations are not permitted in a namespace. -tests/cases/compiler/multipleExports.ts(10,13): error TS2484: Export declaration conflicts with exported declaration of 'x' +tests/cases/compiler/multipleExports.ts(10,13): error TS2484: Export declaration conflicts with exported declaration of 'x'. ==== tests/cases/compiler/multipleExports.ts (2 errors) ==== @@ -16,6 +16,6 @@ tests/cases/compiler/multipleExports.ts(10,13): error TS2484: Export declaration ~~~~~~~~~~~ !!! error TS1194: Export declarations are not permitted in a namespace. ~ -!!! error TS2484: Export declaration conflicts with exported declaration of 'x' +!!! error TS2484: Export declaration conflicts with exported declaration of 'x'. } \ No newline at end of file diff --git a/tests/baselines/reference/nameCollisions.errors.txt b/tests/baselines/reference/nameCollisions.errors.txt index e3c1b691371..6a7e1114aa2 100644 --- a/tests/baselines/reference/nameCollisions.errors.txt +++ b/tests/baselines/reference/nameCollisions.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/nameCollisions.ts(2,9): error TS2300: Duplicate identifier tests/cases/compiler/nameCollisions.ts(4,12): error TS2300: Duplicate identifier 'x'. tests/cases/compiler/nameCollisions.ts(10,12): error TS2300: Duplicate identifier 'z'. tests/cases/compiler/nameCollisions.ts(13,9): error TS2300: Duplicate identifier 'z'. -tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +tests/cases/compiler/nameCollisions.ts(15,12): error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. tests/cases/compiler/nameCollisions.ts(24,9): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/nameCollisions.ts(25,14): error TS2300: Duplicate identifier 'f'. tests/cases/compiler/nameCollisions.ts(27,14): error TS2300: Duplicate identifier 'f2'. @@ -38,7 +38,7 @@ tests/cases/compiler/nameCollisions.ts(37,11): error TS2300: Duplicate identifie module y { ~ -!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged +!!! error TS2434: A namespace declaration cannot be located prior to a class or function with which it is merged. var b; } diff --git a/tests/baselines/reference/objectRestNegative.errors.txt b/tests/baselines/reference/objectRestNegative.errors.txt index 56de8aaccb6..ced36a642d6 100644 --- a/tests/baselines/reference/objectRestNegative.errors.txt +++ b/tests/baselines/reference/objectRestNegative.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/types/rest/objectRestNegative.ts(2,10): error TS2462: A rest element must be last in a destructuring pattern +tests/cases/conformance/types/rest/objectRestNegative.ts(2,10): error TS2462: A rest element must be last in a destructuring pattern. tests/cases/conformance/types/rest/objectRestNegative.ts(6,10): error TS2322: Type '{ a: number; }' is not assignable to type '{ a: string; }'. Types of property 'a' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/conformance/types/rest/objectRestNegative.ts(9,31): error TS2462: A rest element must be last in a destructuring pattern +tests/cases/conformance/types/rest/objectRestNegative.ts(9,31): error TS2462: A rest element must be last in a destructuring pattern. tests/cases/conformance/types/rest/objectRestNegative.ts(11,30): error TS7008: Member 'x' implicitly has an 'any' type. tests/cases/conformance/types/rest/objectRestNegative.ts(11,33): error TS7008: Member 'y' implicitly has an 'any' type. tests/cases/conformance/types/rest/objectRestNegative.ts(12,17): error TS2700: Rest types may only be created from object types. @@ -13,7 +13,7 @@ tests/cases/conformance/types/rest/objectRestNegative.ts(17,9): error TS2701: Th let o = { a: 1, b: 'no' }; var { ...mustBeLast, a } = o; ~~~~~~~~~~ -!!! error TS2462: A rest element must be last in a destructuring pattern +!!! error TS2462: A rest element must be last in a destructuring pattern. var b: string; let notAssignable: { a: string }; @@ -26,7 +26,7 @@ tests/cases/conformance/types/rest/objectRestNegative.ts(17,9): error TS2701: Th function stillMustBeLast({ ...mustBeLast, a }: { a: number, b: string }): void { ~~~~~~~~~~ -!!! error TS2462: A rest element must be last in a destructuring pattern +!!! error TS2462: A rest element must be last in a destructuring pattern. } function generic(t: T) { ~~ diff --git a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index caeca11edf8..bd6a09f500b 100644 --- a/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. 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 '(): void' + Type 'Object' provides no match for the signature '(): void'. tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2322: Type 'Object' is not assignable to type '() => void'. 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 '(): void' + Type 'Object' provides no match for the signature '(): void'. ==== tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== @@ -18,7 +18,7 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf ~ !!! error TS2322: Type 'Object' is not assignable to type 'I'. !!! 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 '(): void' +!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. var a: { (): void @@ -28,4 +28,4 @@ tests/cases/conformance/types/members/objectTypeWithCallSignatureHidingMembersOf ~ !!! error TS2322: Type 'Object' is not assignable to type '() => void'. !!! 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 '(): void' \ No newline at end of file +!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt index ad0e801e435..24136942ea7 100644 --- a/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt +++ b/tests/baselines/reference/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. 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' + Type 'Object' provides no match for the signature 'new (): any'. tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts(14,1): error TS2322: Type 'Object' is not assignable to type 'new () => any'. 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' + Type 'Object' provides no match for the signature 'new (): any'. ==== tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMembersOfFunctionAssignmentCompat.ts (2 errors) ==== @@ -18,7 +18,7 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb ~ !!! error TS2322: Type 'Object' is not assignable to type 'I'. !!! 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' +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. var a: { new(): any @@ -28,4 +28,4 @@ tests/cases/conformance/types/members/objectTypeWithConstructSignatureHidingMemb ~ !!! error TS2322: Type 'Object' is not assignable to type 'new () => any'. !!! 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' \ No newline at end of file +!!! error TS2322: Type 'Object' provides no match for the signature 'new (): any'. \ No newline at end of file diff --git a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt index d6f2d2bae19..c7f4d14601e 100644 --- a/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt +++ b/tests/baselines/reference/objectTypesWithPredefinedTypesAsName.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(3,7): error TS2414: Class name cannot be 'any' -tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(5,7): error TS2414: Class name cannot be 'number' -tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(7,7): error TS2414: Class name cannot be 'boolean' -tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(10,7): error TS2414: Class name cannot be 'string' +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(3,7): error TS2414: Class name cannot be 'any'. +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(5,7): error TS2414: Class name cannot be 'number'. +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(7,7): error TS2414: Class name cannot be 'boolean'. +tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts(10,7): error TS2414: Class name cannot be 'string'. ==== tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPredefinedTypesAsName.ts (4 errors) ==== @@ -9,20 +9,20 @@ tests/cases/conformance/types/specifyingTypes/predefinedTypes/objectTypesWithPre class any { } ~~~ -!!! error TS2414: Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any'. class number { } ~~~~~~ -!!! error TS2414: Class name cannot be 'number' +!!! error TS2414: Class name cannot be 'number'. class boolean { } ~~~~~~~ -!!! error TS2414: Class name cannot be 'boolean' +!!! error TS2414: Class name cannot be 'boolean'. class bool { } // not a predefined type anymore class string { } ~~~~~~ -!!! error TS2414: Class name cannot be 'string' +!!! error TS2414: Class name cannot be 'string'. \ No newline at end of file diff --git a/tests/baselines/reference/packageJsonMain.trace.json b/tests/baselines/reference/packageJsonMain.trace.json index a167e8dfec6..08daccbe479 100644 --- a/tests/baselines/reference/packageJsonMain.trace.json +++ b/tests/baselines/reference/packageJsonMain.trace.json @@ -20,7 +20,7 @@ "File '/node_modules/foo/oof' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/foo/oof', target file type 'JavaScript'.", "File '/node_modules/foo/oof.js' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/foo/oof.js', result '/node_modules/foo/oof.js'", + "Resolving real path for '/node_modules/foo/oof.js', result '/node_modules/foo/oof.js'.", "======== Module name 'foo' was successfully resolved to '/node_modules/foo/oof.js'. ========", "======== Resolving module 'bar' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -41,7 +41,7 @@ "Found 'package.json' at '/node_modules/bar/package.json'.", "'package.json' has 'main' field 'rab.js' that references '/node_modules/bar/rab.js'.", "File '/node_modules/bar/rab.js' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/bar/rab.js', result '/node_modules/bar/rab.js'", + "Resolving real path for '/node_modules/bar/rab.js', result '/node_modules/bar/rab.js'.", "======== Module name 'bar' was successfully resolved to '/node_modules/bar/rab.js'. ========", "======== Resolving module 'baz' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -66,6 +66,6 @@ "File '/node_modules/baz/zab.js' does not exist.", "File '/node_modules/baz/zab.jsx' does not exist.", "File '/node_modules/baz/zab/index.js' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/baz/zab/index.js', result '/node_modules/baz/zab/index.js'", + "Resolving real path for '/node_modules/baz/zab/index.js', result '/node_modules/baz/zab/index.js'.", "======== Module name 'baz' was successfully resolved to '/node_modules/baz/zab/index.js'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/parseTypes.errors.txt b/tests/baselines/reference/parseTypes.errors.txt index cf8b0d79115..184137fe220 100644 --- a/tests/baselines/reference/parseTypes.errors.txt +++ b/tests/baselines/reference/parseTypes.errors.txt @@ -3,7 +3,7 @@ tests/cases/compiler/parseTypes.ts(10,1): error TS2322: Type '(s: string) => voi tests/cases/compiler/parseTypes.ts(11,1): error TS2322: Type '(s: string) => void' is not assignable to type '{ [x: number]: number; }'. Index signature is missing in type '(s: string) => void'. tests/cases/compiler/parseTypes.ts(12,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' + Type '(s: string) => void' provides no match for the signature 'new (): number'. ==== tests/cases/compiler/parseTypes.ts (4 errors) ==== @@ -28,5 +28,5 @@ tests/cases/compiler/parseTypes.ts(12,1): error TS2322: Type '(s: string) => voi 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' +!!! 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/parser10.1.1-8gs.errors.txt b/tests/baselines/reference/parser10.1.1-8gs.errors.txt index 3426ccab8da..75ab54029a6 100644 --- a/tests/baselines/reference/parser10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/parser10.1.1-8gs.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(17,7): error TS2304: Cannot find name 'NotEarlyError'. -tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(18,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode +tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(18,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ==== tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts (2 errors) ==== @@ -24,5 +24,5 @@ tests/cases/conformance/parser/ecmascript5/parser10.1.1-8gs.ts(18,5): error TS12 !!! error TS2304: Cannot find name 'NotEarlyError'. var public = 1; ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt index a2bbb98fbf4..6797a574021 100644 --- a/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt +++ b/tests/baselines/reference/parserAutomaticSemicolonInsertion1.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(8,1): error TS2322: Type 'Object' is not assignable to type 'I'. 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 '(): void' + Type 'Object' provides no match for the signature '(): void'. tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts(14,1): error TS2322: Type 'Object' is not assignable to type '() => void'. 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 '(): void' + Type 'Object' provides no match for the signature '(): void'. ==== tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAutomaticSemicolonInsertion1.ts (2 errors) ==== @@ -18,7 +18,7 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut ~ !!! error TS2322: Type 'Object' is not assignable to type 'I'. !!! 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 '(): void' +!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. var a: { (): void @@ -28,5 +28,5 @@ tests/cases/conformance/parser/ecmascript5/AutomaticSemicolonInsertion/parserAut ~ !!! error TS2322: Type 'Object' is not assignable to type '() => void'. !!! 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 '(): void' +!!! error TS2322: Type 'Object' provides no match for the signature '(): void'. \ No newline at end of file diff --git a/tests/baselines/reference/parserClassDeclaration24.errors.txt b/tests/baselines/reference/parserClassDeclaration24.errors.txt index 5b3b0640684..02a2b835d2b 100644 --- a/tests/baselines/reference/parserClassDeclaration24.errors.txt +++ b/tests/baselines/reference/parserClassDeclaration24.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any' +tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts(1,7): error TS2414: Class name cannot be 'any'. ==== tests/cases/conformance/parser/ecmascript5/ClassDeclarations/parserClassDeclaration24.ts (1 errors) ==== class any { ~~~ -!!! error TS2414: Class name cannot be 'any' +!!! error TS2414: Class name cannot be 'any'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserInterfaceDeclaration8.errors.txt b/tests/baselines/reference/parserInterfaceDeclaration8.errors.txt index 2c50b97d163..90af9c235e6 100644 --- a/tests/baselines/reference/parserInterfaceDeclaration8.errors.txt +++ b/tests/baselines/reference/parserInterfaceDeclaration8.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string' +tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration8.ts(1,11): error TS2427: Interface name cannot be 'string'. ==== tests/cases/conformance/parser/ecmascript5/InterfaceDeclarations/parserInterfaceDeclaration8.ts (1 errors) ==== interface string { ~~~~~~ -!!! error TS2427: Interface name cannot be 'string' +!!! error TS2427: Interface name cannot be 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/parserStrictMode15.errors.txt b/tests/baselines/reference/parserStrictMode15.errors.txt index 831d214c9fb..e3d38176130 100644 --- a/tests/baselines/reference/parserStrictMode15.errors.txt +++ b/tests/baselines/reference/parserStrictMode15.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS1102: 'delete' cannot be called on an identifier in strict mode. tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS2304: Cannot find name 'a'. -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts (3 errors) ==== @@ -11,4 +11,4 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode15.ts(2,8) ~ !!! error TS2304: Cannot find name 'a'. ~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/parserStrictMode16.errors.txt b/tests/baselines/reference/parserStrictMode16.errors.txt index fe99c337232..4761f0a94b4 100644 --- a/tests/baselines/reference/parserStrictMode16.errors.txt +++ b/tests/baselines/reference/parserStrictMode16.errors.txt @@ -1,20 +1,20 @@ -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(2,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(3,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(4,8): error TS2703: The operand of a delete operator must be a property reference -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(5,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(2,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(3,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(4,8): error TS2703: The operand of a delete operator must be a property reference. +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts(5,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode16.ts (4 errors) ==== "use strict"; delete this; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete 1; ~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete null; ~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference +!!! error TS2703: The operand of a delete operator must be a property reference. delete "a"; ~~~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/parserStrictMode2.errors.txt b/tests/baselines/reference/parserStrictMode2.errors.txt index 464e8eface8..c112d562ad9 100644 --- a/tests/baselines/reference/parserStrictMode2.errors.txt +++ b/tests/baselines/reference/parserStrictMode2.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(2,1): error TS2304: Cannot find name 'foo1'. tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(3,1): error TS2304: Cannot find name 'foo1'. tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(4,1): error TS2304: Cannot find name 'foo1'. -tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS1212: Identifier expected. 'static' is a reserved word in strict mode +tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): error TS2304: Cannot find name 'static'. @@ -18,6 +18,6 @@ tests/cases/conformance/parser/ecmascript5/StrictMode/parserStrictMode2.ts(5,1): !!! error TS2304: Cannot find name 'foo1'. static(); ~~~~~~ -!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. ~~~~~~ !!! error TS2304: Cannot find name 'static'. \ No newline at end of file diff --git a/tests/baselines/reference/parser_duplicateLabel1.errors.txt b/tests/baselines/reference/parser_duplicateLabel1.errors.txt index c98ede21ecf..95c0ad9a290 100644 --- a/tests/baselines/reference/parser_duplicateLabel1.errors.txt +++ b/tests/baselines/reference/parser_duplicateLabel1.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(1,1): error TS7028: Unused label. -tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target' +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS1114: Duplicate label 'target'. tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel1.ts(2,1): error TS7028: Unused label. @@ -9,7 +9,7 @@ tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_d !!! error TS7028: Unused label. target: ~~~~~~ -!!! error TS1114: Duplicate label 'target' +!!! error TS1114: Duplicate label 'target'. ~~~~~~ !!! error TS7028: Unused label. while (true) { diff --git a/tests/baselines/reference/parser_duplicateLabel2.errors.txt b/tests/baselines/reference/parser_duplicateLabel2.errors.txt index cbad8b73a21..6d42b8c34fe 100644 --- a/tests/baselines/reference/parser_duplicateLabel2.errors.txt +++ b/tests/baselines/reference/parser_duplicateLabel2.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(1,1): error TS7028: Unused label. -tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target' +tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS1114: Duplicate label 'target'. tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_duplicateLabel2.ts(3,3): error TS7028: Unused label. @@ -10,7 +10,7 @@ tests/cases/conformance/parser/ecmascript5/Statements/LabeledStatements/parser_d while (true) { target: ~~~~~~ -!!! error TS1114: Duplicate label 'target' +!!! error TS1114: Duplicate label 'target'. ~~~~~~ !!! error TS7028: Unused label. while (true) { diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt index ad954bd142b..3b0a387f644 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_classic.errors.txt @@ -1,8 +1,8 @@ -error TS5061: Pattern '*1*' can have at most one '*' character -error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +error TS5061: Pattern '*1*' can have at most one '*' character. +error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. -!!! error TS5061: Pattern '*1*' can have at most one '*' character -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +!!! error TS5061: Pattern '*1*' can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. ==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt index ad954bd142b..3b0a387f644 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt +++ b/tests/baselines/reference/pathMappingBasedModuleResolution2_node.errors.txt @@ -1,8 +1,8 @@ -error TS5061: Pattern '*1*' can have at most one '*' character -error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +error TS5061: Pattern '*1*' can have at most one '*' character. +error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. -!!! error TS5061: Pattern '*1*' can have at most one '*' character -!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character +!!! error TS5061: Pattern '*1*' can have at most one '*' character. +!!! error TS5062: Substitution '*2*' in pattern '*1*' in can have at most one '*' character. ==== tests/cases/compiler/root/src/folder1/file1.ts (0 errors) ==== export var x = 1; \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json index 90b8620e36c..cd76270105b 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_classic.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", "Explicitly specified module resolution kind: 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'.", "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", "File 'c:/root/folder2/file2.ts' exist - use it as a name resolution result.", "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", @@ -11,7 +11,7 @@ "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", "Explicitly specified module resolution kind: 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json index c61871b34c0..6ac06e1dda1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution3_node.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'.", "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", "Loading module as file / folder, candidate module location 'c:/root/folder2/file2', target file type 'TypeScript'.", "File 'c:/root/folder2/file2.ts' exist - use it as a name resolution result.", @@ -13,7 +13,7 @@ "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "Loading module as file / folder, candidate module location 'c:/root/file4', target file type 'TypeScript'.", "File 'c:/root/file4.ts' does not exist.", @@ -30,6 +30,6 @@ "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", "File 'c:/node_modules/file4/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'c:/node_modules/file4/index.d.ts', result 'c:/node_modules/file4/index.d.ts'", + "Resolving real path for 'c:/node_modules/file4/index.d.ts', result 'c:/node_modules/file4/index.d.ts'.", "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4/index.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json index 90b8620e36c..cd76270105b 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_classic.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", "Explicitly specified module resolution kind: 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'.", "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", "File 'c:/root/folder2/file2.ts' exist - use it as a name resolution result.", "======== Module name 'folder2/file2' was successfully resolved to 'c:/root/folder2/file2.ts'. ========", @@ -11,7 +11,7 @@ "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", "Explicitly specified module resolution kind: 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "File 'c:/root/file4.ts' does not exist.", "File 'c:/root/file4.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json index c61871b34c0..6ac06e1dda1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution4_node.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file2' from 'c:/root/folder1/file1.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file2'.", "Resolving module name 'folder2/file2' relative to base url 'c:/root' - 'c:/root/folder2/file2'.", "Loading module as file / folder, candidate module location 'c:/root/folder2/file2', target file type 'TypeScript'.", "File 'c:/root/folder2/file2.ts' exist - use it as a name resolution result.", @@ -13,7 +13,7 @@ "======== Module name './file3' was successfully resolved to 'c:/root/folder2/file3.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder2/file2.ts'. ========", "Explicitly specified module resolution kind: 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "Resolving module name 'file4' relative to base url 'c:/root' - 'c:/root/file4'.", "Loading module as file / folder, candidate module location 'c:/root/file4', target file type 'TypeScript'.", "File 'c:/root/file4.ts' does not exist.", @@ -30,6 +30,6 @@ "File 'c:/node_modules/file4/index.ts' does not exist.", "File 'c:/node_modules/file4/index.tsx' does not exist.", "File 'c:/node_modules/file4/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'c:/node_modules/file4/index.d.ts', result 'c:/node_modules/file4/index.d.ts'", + "Resolving real path for 'c:/node_modules/file4/index.d.ts', result 'c:/node_modules/file4/index.d.ts'.", "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4/index.d.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json index 9108b25e88c..4fa08fc9cc1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_classic.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file1' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'.", "'paths' option is specified, looking for a pattern to match module name 'folder2/file1'.", "Module name 'folder2/file1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder2/file1'.", @@ -9,7 +9,7 @@ "======== Module name 'folder2/file1' was successfully resolved to 'c:/root/folder2/file1.ts'. ========", "======== Resolving module 'folder3/file2' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'.", "'paths' option is specified, looking for a pattern to match module name 'folder3/file2'.", "Module name 'folder3/file2', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder3/file2'.", @@ -18,7 +18,7 @@ "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", "======== Resolving module 'components/file3' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'.", "'paths' option is specified, looking for a pattern to match module name 'components/file3'.", "Module name 'components/file3', matched pattern 'components/*'.", "Trying substitution 'shared/components/*', candidate module location: 'shared/components/file3'.", @@ -26,7 +26,7 @@ "======== Module name 'components/file3' was successfully resolved to 'c:/root/shared/components/file3.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "'paths' option is specified, looking for a pattern to match module name 'file4'.", "Module name 'file4', matched pattern '*'.", "Trying substitution '*', candidate module location: 'file4'.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json index d70942a4b47..3b6710408fc 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution5_node.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'folder2/file1' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder2/file1'.", "'paths' option is specified, looking for a pattern to match module name 'folder2/file1'.", "Module name 'folder2/file1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder2/file1'.", @@ -10,7 +10,7 @@ "======== Module name 'folder2/file1' was successfully resolved to 'c:/root/folder2/file1.ts'. ========", "======== Resolving module 'folder3/file2' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'folder3/file2'.", "'paths' option is specified, looking for a pattern to match module name 'folder3/file2'.", "Module name 'folder3/file2', matched pattern '*'.", "Trying substitution '*', candidate module location: 'folder3/file2'.", @@ -21,7 +21,7 @@ "======== Module name 'folder3/file2' was successfully resolved to 'c:/root/generated/folder3/file2.ts'. ========", "======== Resolving module 'components/file3' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'components/file3'.", "'paths' option is specified, looking for a pattern to match module name 'components/file3'.", "Module name 'components/file3', matched pattern 'components/*'.", "Trying substitution 'shared/components/*', candidate module location: 'shared/components/file3'.", @@ -36,7 +36,7 @@ "======== Module name 'components/file3' was successfully resolved to 'c:/root/shared/components/file3/index.d.ts'. ========", "======== Resolving module 'file4' from 'c:/root/folder1/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'", + "'baseUrl' option is set to 'c:/root', using this value to resolve non-relative module name 'file4'.", "'paths' option is specified, looking for a pattern to match module name 'file4'.", "Module name 'file4', matched pattern '*'.", "Trying substitution '*', candidate module location: 'file4'.", @@ -55,6 +55,6 @@ "Directory 'c:/root/folder1/node_modules' does not exist, skipping all lookups in it.", "Directory 'c:/root/node_modules' does not exist, skipping all lookups in it.", "File 'c:/node_modules/file4.ts' exist - use it as a name resolution result.", - "Resolving real path for 'c:/node_modules/file4.ts', result 'c:/node_modules/file4.ts'", + "Resolving real path for 'c:/node_modules/file4.ts', result 'c:/node_modules/file4.ts'.", "======== Module name 'file4' was successfully resolved to 'c:/node_modules/file4.ts'. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json index ec865b7ac66..93bc0e4db89 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_classic.trace.json @@ -1,27 +1,27 @@ [ "======== Resolving module './project/file3' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'rootDirs' option is set, using it to resolve relative module name './project/file3'", + "'rootDirs' option is set, using it to resolve relative module name './project/file3'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'true'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'false'.", - "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", - "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", - "Trying other entries in 'rootDirs'", - "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", + "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'.", + "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'.", + "Trying other entries in 'rootDirs'.", + "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'.", "File 'c:/root/generated/src/project/file3.ts' exist - use it as a name resolution result.", "======== Module name './project/file3' was successfully resolved to 'c:/root/generated/src/project/file3.ts'. ========", "======== Resolving module '../file2' from 'c:/root/generated/src/project/file3.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'rootDirs' option is set, using it to resolve relative module name '../file2'", + "'rootDirs' option is set, using it to resolve relative module name '../file2'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'false'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'true'.", - "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", - "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", + "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'.", + "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'.", "File 'c:/root/generated/src/file2.ts' does not exist.", "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", - "Trying other entries in 'rootDirs'", - "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", + "Trying other entries in 'rootDirs'.", + "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'.", "File 'c:/root/src/file2.ts' does not exist.", "File 'c:/root/src/file2.tsx' does not exist.", "File 'c:/root/src/file2.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json index d623e166ef0..50f9bd862c1 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution6_node.trace.json @@ -1,32 +1,32 @@ [ "======== Resolving module './project/file3' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'rootDirs' option is set, using it to resolve relative module name './project/file3'", + "'rootDirs' option is set, using it to resolve relative module name './project/file3'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'true'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file3' - 'false'.", - "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'", - "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'", + "Longest matching prefix for 'c:/root/src/project/file3' is 'c:/root/src/'.", + "Loading 'project/file3' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file3'.", "Loading module as file / folder, candidate module location 'c:/root/src/project/file3', target file type 'TypeScript'.", "Directory 'c:/root/src/project' does not exist, skipping all lookups in it.", - "Trying other entries in 'rootDirs'", - "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'", + "Trying other entries in 'rootDirs'.", + "Loading 'project/file3' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file3'.", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file3', target file type 'TypeScript'.", "File 'c:/root/generated/src/project/file3.ts' exist - use it as a name resolution result.", "======== Module name './project/file3' was successfully resolved to 'c:/root/generated/src/project/file3.ts'. ========", "======== Resolving module '../file2' from 'c:/root/generated/src/project/file3.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'rootDirs' option is set, using it to resolve relative module name '../file2'", + "'rootDirs' option is set, using it to resolve relative module name '../file2'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'false'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file2' - 'true'.", - "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'", - "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'", + "Longest matching prefix for 'c:/root/generated/src/file2' is 'c:/root/generated/src/'.", + "Loading 'file2' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file2'.", "Loading module as file / folder, candidate module location 'c:/root/generated/src/file2', target file type 'TypeScript'.", "File 'c:/root/generated/src/file2.ts' does not exist.", "File 'c:/root/generated/src/file2.tsx' does not exist.", "File 'c:/root/generated/src/file2.d.ts' does not exist.", "Directory 'c:/root/generated/src/file2' does not exist, skipping all lookups in it.", - "Trying other entries in 'rootDirs'", - "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'", + "Trying other entries in 'rootDirs'.", + "Loading 'file2' from the root dir 'c:/root/src', candidate location 'c:/root/src/file2'.", "Loading module as file / folder, candidate module location 'c:/root/src/file2', target file type 'TypeScript'.", "File 'c:/root/src/file2.ts' does not exist.", "File 'c:/root/src/file2.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json index 61056ea8502..78a273ae059 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_classic.trace.json @@ -1,18 +1,18 @@ [ "======== Resolving module './project/file2' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'rootDirs' option is set, using it to resolve relative module name './project/file2'", + "'rootDirs' option is set, using it to resolve relative module name './project/file2'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'true'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'false'.", - "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", - "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", - "Trying other entries in 'rootDirs'", - "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", + "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'.", + "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'.", + "Trying other entries in 'rootDirs'.", + "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'.", "File 'c:/root/generated/src/project/file2.ts' exist - use it as a name resolution result.", "======== Module name './project/file2' was successfully resolved to 'c:/root/generated/src/project/file2.ts'. ========", "======== Resolving module 'module3' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module3'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module3'.", "'paths' option is specified, looking for a pattern to match module name 'module3'.", "Module name 'module3', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module3'.", @@ -35,7 +35,7 @@ "======== Module name 'module3' was successfully resolved to 'c:/module3.d.ts'. ========", "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module1'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module1'.", "'paths' option is specified, looking for a pattern to match module name 'module1'.", "Module name 'module1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module1'.", @@ -49,7 +49,7 @@ "======== Module name 'module1' was successfully resolved to 'c:/shared/module1.d.ts'. ========", "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'templates/module2'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'templates/module2'.", "'paths' option is specified, looking for a pattern to match module name 'templates/module2'.", "Module name 'templates/module2', matched pattern 'templates/*'.", "Trying substitution 'generated/src/templates/*', candidate module location: 'generated/src/templates/module2'.", @@ -57,16 +57,16 @@ "======== Module name 'templates/module2' was successfully resolved to 'c:/root/generated/src/templates/module2.ts'. ========", "======== Resolving module '../file3' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'Classic'.", - "'rootDirs' option is set, using it to resolve relative module name '../file3'", + "'rootDirs' option is set, using it to resolve relative module name '../file3'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'false'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'true'.", - "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", - "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", + "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'.", + "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'.", "File 'c:/root/generated/src/file3.ts' does not exist.", "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", - "Trying other entries in 'rootDirs'", - "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", + "Trying other entries in 'rootDirs'.", + "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'.", "File 'c:/root/src/file3.ts' does not exist.", "File 'c:/root/src/file3.tsx' does not exist.", "File 'c:/root/src/file3.d.ts' exist - use it as a name resolution result.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json index 4cc7dbae1c1..50e4a6fabeb 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution7_node.trace.json @@ -1,21 +1,21 @@ [ "======== Resolving module './project/file2' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'rootDirs' option is set, using it to resolve relative module name './project/file2'", + "'rootDirs' option is set, using it to resolve relative module name './project/file2'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'true'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/src/project/file2' - 'false'.", - "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'", - "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'", + "Longest matching prefix for 'c:/root/src/project/file2' is 'c:/root/src/'.", + "Loading 'project/file2' from the root dir 'c:/root/src/', candidate location 'c:/root/src/project/file2'.", "Loading module as file / folder, candidate module location 'c:/root/src/project/file2', target file type 'TypeScript'.", "Directory 'c:/root/src/project' does not exist, skipping all lookups in it.", - "Trying other entries in 'rootDirs'", - "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'", + "Trying other entries in 'rootDirs'.", + "Loading 'project/file2' from the root dir 'c:/root/generated/src', candidate location 'c:/root/generated/src/project/file2'.", "Loading module as file / folder, candidate module location 'c:/root/generated/src/project/file2', target file type 'TypeScript'.", "File 'c:/root/generated/src/project/file2.ts' exist - use it as a name resolution result.", "======== Module name './project/file2' was successfully resolved to 'c:/root/generated/src/project/file2.ts'. ========", "======== Resolving module 'module3' from 'c:/root/src/file1.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module3'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module3'.", "'paths' option is specified, looking for a pattern to match module name 'module3'.", "Module name 'module3', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module3'.", @@ -36,11 +36,11 @@ "File 'c:/node_modules/module3.ts' does not exist.", "File 'c:/node_modules/module3.tsx' does not exist.", "File 'c:/node_modules/module3.d.ts' exist - use it as a name resolution result.", - "Resolving real path for 'c:/node_modules/module3.d.ts', result 'c:/node_modules/module3.d.ts'", + "Resolving real path for 'c:/node_modules/module3.d.ts', result 'c:/node_modules/module3.d.ts'.", "======== Module name 'module3' was successfully resolved to 'c:/node_modules/module3.d.ts'. ========", "======== Resolving module 'module1' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module1'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'module1'.", "'paths' option is specified, looking for a pattern to match module name 'module1'.", "Module name 'module1', matched pattern '*'.", "Trying substitution '*', candidate module location: 'module1'.", @@ -61,7 +61,7 @@ "======== Module name 'module1' was successfully resolved to 'c:/shared/module1/index.d.ts'. ========", "======== Resolving module 'templates/module2' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'templates/module2'", + "'baseUrl' option is set to 'c:/root/', using this value to resolve non-relative module name 'templates/module2'.", "'paths' option is specified, looking for a pattern to match module name 'templates/module2'.", "Module name 'templates/module2', matched pattern 'templates/*'.", "Trying substitution 'generated/src/templates/*', candidate module location: 'generated/src/templates/module2'.", @@ -70,18 +70,18 @@ "======== Module name 'templates/module2' was successfully resolved to 'c:/root/generated/src/templates/module2.ts'. ========", "======== Resolving module '../file3' from 'c:/root/generated/src/project/file2.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'rootDirs' option is set, using it to resolve relative module name '../file3'", + "'rootDirs' option is set, using it to resolve relative module name '../file3'.", "Checking if 'c:/root/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'false'.", "Checking if 'c:/root/generated/src/' is the longest matching prefix for 'c:/root/generated/src/file3' - 'true'.", - "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'", - "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'", + "Longest matching prefix for 'c:/root/generated/src/file3' is 'c:/root/generated/src/'.", + "Loading 'file3' from the root dir 'c:/root/generated/src/', candidate location 'c:/root/generated/src/file3'.", "Loading module as file / folder, candidate module location 'c:/root/generated/src/file3', target file type 'TypeScript'.", "File 'c:/root/generated/src/file3.ts' does not exist.", "File 'c:/root/generated/src/file3.tsx' does not exist.", "File 'c:/root/generated/src/file3.d.ts' does not exist.", "Directory 'c:/root/generated/src/file3' does not exist, skipping all lookups in it.", - "Trying other entries in 'rootDirs'", - "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'", + "Trying other entries in 'rootDirs'.", + "Loading 'file3' from the root dir 'c:/root/src', candidate location 'c:/root/src/file3'.", "Loading module as file / folder, candidate module location 'c:/root/src/file3', target file type 'TypeScript'.", "File 'c:/root/src/file3.ts' does not exist.", "File 'c:/root/src/file3.tsx' does not exist.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.trace.json index a761414eb42..39a12996d42 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension.trace.json @@ -1,7 +1,7 @@ [ "======== Resolving module 'foo' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'", + "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'.", "'paths' option is specified, looking for a pattern to match module name 'foo'.", "Module name 'foo', matched pattern 'foo'.", "Trying substitution 'foo/foo.ts', candidate module location: 'foo/foo.ts'.", @@ -9,7 +9,7 @@ "======== Module name 'foo' was successfully resolved to '/foo/foo.ts'. ========", "======== Resolving module 'bar' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'bar'", + "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'bar'.", "'paths' option is specified, looking for a pattern to match module name 'bar'.", "Module name 'bar', matched pattern 'bar'.", "Trying substitution 'bar/bar.js', candidate module location: 'bar/bar.js'.", diff --git a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.trace.json b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.trace.json index 197b7f5c249..7561a47b1e7 100644 --- a/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.trace.json +++ b/tests/baselines/reference/pathMappingBasedModuleResolution_withExtension_failedLookup.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving module 'foo' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", - "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'", + "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'.", "'paths' option is specified, looking for a pattern to match module name 'foo'.", "Module name 'foo', matched pattern 'foo'.", "Trying substitution 'foo/foo.ts', candidate module location: 'foo/foo.ts'.", "File '/foo/foo.ts' does not exist.", "Loading module 'foo' from 'node_modules' folder, target file type 'TypeScript'.", "Directory '/node_modules' does not exist, skipping all lookups in it.", - "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'", + "'baseUrl' option is set to '/', using this value to resolve non-relative module name 'foo'.", "'paths' option is specified, looking for a pattern to match module name 'foo'.", "Module name 'foo', matched pattern 'foo'.", "Trying substitution 'foo/foo.ts', candidate module location: 'foo/foo.ts'.", diff --git a/tests/baselines/reference/primitiveTypeAsClassName.errors.txt b/tests/baselines/reference/primitiveTypeAsClassName.errors.txt index 1ce55c30034..7c02830357d 100644 --- a/tests/baselines/reference/primitiveTypeAsClassName.errors.txt +++ b/tests/baselines/reference/primitiveTypeAsClassName.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/primitiveTypeAsClassName.ts(1,7): error TS2414: Class name cannot be 'any' +tests/cases/compiler/primitiveTypeAsClassName.ts(1,7): error TS2414: Class name cannot be 'any'. ==== tests/cases/compiler/primitiveTypeAsClassName.ts (1 errors) ==== class any {} ~~~ -!!! error TS2414: Class name cannot be 'any' \ No newline at end of file +!!! error TS2414: Class name cannot be 'any'. \ No newline at end of file diff --git a/tests/baselines/reference/primitiveTypeAsInterfaceName.errors.txt b/tests/baselines/reference/primitiveTypeAsInterfaceName.errors.txt index 7876ec7f85f..d260fc77574 100644 --- a/tests/baselines/reference/primitiveTypeAsInterfaceName.errors.txt +++ b/tests/baselines/reference/primitiveTypeAsInterfaceName.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/primitiveTypeAsInterfaceName.ts(1,11): error TS2427: Interface name cannot be 'number' +tests/cases/compiler/primitiveTypeAsInterfaceName.ts(1,11): error TS2427: Interface name cannot be 'number'. ==== tests/cases/compiler/primitiveTypeAsInterfaceName.ts (1 errors) ==== interface number {} ~~~~~~ -!!! error TS2427: Interface name cannot be 'number' \ No newline at end of file +!!! error TS2427: Interface name cannot be 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/primitiveTypeAsInterfaceNameGeneric.errors.txt b/tests/baselines/reference/primitiveTypeAsInterfaceNameGeneric.errors.txt index 3054df57431..5757d27c41c 100644 --- a/tests/baselines/reference/primitiveTypeAsInterfaceNameGeneric.errors.txt +++ b/tests/baselines/reference/primitiveTypeAsInterfaceNameGeneric.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/primitiveTypeAsInterfaceNameGeneric.ts(1,11): error TS2427: Interface name cannot be 'number' +tests/cases/compiler/primitiveTypeAsInterfaceNameGeneric.ts(1,11): error TS2427: Interface name cannot be 'number'. ==== tests/cases/compiler/primitiveTypeAsInterfaceNameGeneric.ts (1 errors) ==== interface number {} ~~~~~~ -!!! error TS2427: Interface name cannot be 'number' \ No newline at end of file +!!! error TS2427: Interface name cannot be 'number'. \ No newline at end of file diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt index 668f037a03b..eadcbd8ca99 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/amd/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -1,11 +1,11 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. !!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' 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 +!!! 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. ==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== declare var a: number; ==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== diff --git a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt index 668f037a03b..eadcbd8ca99 100644 --- a/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt +++ b/tests/baselines/reference/project/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs/node/jsFileCompilationSameNameDtsNotSpecifiedWithAllowJs.errors.txt @@ -1,11 +1,11 @@ error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' 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 + Adding a tsconfig.json file will help organize projects that contain both TypeScript and JavaScript files. Learn more at https://aka.ms/tsconfig. !!! error TS5053: Option 'allowJs' cannot be specified with option 'declaration'. !!! error TS5055: Cannot write file 'SameNameDTsNotSpecifiedWithAllowJs/a.js' 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 +!!! 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. ==== SameNameDTsNotSpecifiedWithAllowJs/a.d.ts (0 errors) ==== declare var a: number; ==== SameNameDTsNotSpecifiedWithAllowJs/a.js (0 errors) ==== diff --git a/tests/baselines/reference/propertyAssignment.errors.txt b/tests/baselines/reference/propertyAssignment.errors.txt index 815d0a44d53..a8411ca490c 100644 --- a/tests/baselines/reference/propertyAssignment.errors.txt +++ b/tests/baselines/reference/propertyAssignment.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/propertyAssignment.ts(6,13): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol. tests/cases/compiler/propertyAssignment.ts(6,14): error TS2304: Cannot find name 'index'. tests/cases/compiler/propertyAssignment.ts(14,1): error TS2322: Type '{ x: number; }' is not assignable to type 'new () => any'. - Type '{ x: number; }' provides no match for the signature 'new (): any' + Type '{ x: number; }' provides no match for the signature 'new (): any'. tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: number; }' is not assignable to type '() => void'. - Type '{ x: number; }' provides no match for the signature '(): void' + Type '{ x: number; }' provides no match for the signature '(): void'. ==== tests/cases/compiler/propertyAssignment.ts (4 errors) ==== @@ -27,9 +27,9 @@ tests/cases/compiler/propertyAssignment.ts(16,1): error TS2322: Type '{ x: numbe 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' +!!! 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 +!!! error TS2322: Type '{ x: number; }' provides no match for the signature '(): void'. \ No newline at end of file diff --git a/tests/baselines/reference/qualify.errors.txt b/tests/baselines/reference/qualify.errors.txt index 53c9927737f..6c12823c964 100644 --- a/tests/baselines/reference/qualify.errors.txt +++ b/tests/baselines/reference/qualify.errors.txt @@ -5,9 +5,9 @@ tests/cases/compiler/qualify.ts(45,13): error TS2322: Type 'I4' is not assignabl tests/cases/compiler/qualify.ts(46,13): error TS2322: Type 'I4' is not assignable to type 'I3[]'. Property 'length' is missing in type 'I4'. tests/cases/compiler/qualify.ts(47,13): error TS2322: Type 'I4' is not assignable to type '() => I3'. - Type 'I4' provides no match for the signature '(): I3' + Type 'I4' provides no match for the signature '(): I3'. tests/cases/compiler/qualify.ts(48,13): error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. - Type 'I4' provides no match for the signature '(k: I3): void' + Type 'I4' provides no match for the signature '(k: I3): void'. tests/cases/compiler/qualify.ts(49,13): error TS2322: Type 'I4' is not assignable to type '{ k: I3; }'. Property 'k' is missing in type 'I4'. tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable to type 'T.I'. @@ -74,11 +74,11 @@ tests/cases/compiler/qualify.ts(58,5): error TS2322: Type 'I' is not assignable var v4:()=>K1.I3=v1; ~~ !!! error TS2322: Type 'I4' is not assignable to type '() => I3'. -!!! error TS2322: Type 'I4' provides no match for the signature '(): I3' +!!! error TS2322: Type 'I4' provides no match for the signature '(): I3'. var v5:(k:K1.I3)=>void=v1; ~~ !!! error TS2322: Type 'I4' is not assignable to type '(k: I3) => void'. -!!! error TS2322: Type 'I4' provides no match for the signature '(k: I3): void' +!!! error TS2322: Type 'I4' provides no match for the signature '(k: I3): void'. var v6:{k:K1.I3;}=v1; ~~ !!! error TS2322: Type 'I4' is not assignable to type '{ k: I3; }'. diff --git a/tests/baselines/reference/reboundIdentifierOnImportAlias.errors.txt b/tests/baselines/reference/reboundIdentifierOnImportAlias.errors.txt index 27969d0e0cb..9e51575bdc8 100644 --- a/tests/baselines/reference/reboundIdentifierOnImportAlias.errors.txt +++ b/tests/baselines/reference/reboundIdentifierOnImportAlias.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reboundIdentifierOnImportAlias.ts(6,16): error TS2437: Module 'Foo' is hidden by a local declaration with the same name +tests/cases/compiler/reboundIdentifierOnImportAlias.ts(6,16): error TS2437: Module 'Foo' is hidden by a local declaration with the same name. ==== tests/cases/compiler/reboundIdentifierOnImportAlias.ts (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/compiler/reboundIdentifierOnImportAlias.ts(6,16): error TS2437: Modu var Foo = 1; import F = Foo; ~~~ -!!! error TS2437: Module 'Foo' is hidden by a local declaration with the same name +!!! error TS2437: Module 'Foo' is hidden by a local declaration with the same name. } \ No newline at end of file diff --git a/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt index 9fd4c63f02f..9b1cad852ab 100644 --- a/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt +++ b/tests/baselines/reference/redeclareParameterInCatchBlock.errors.txt @@ -1,6 +1,6 @@ -tests/cases/compiler/redeclareParameterInCatchBlock.ts(5,11): error TS2492: Cannot redeclare identifier 'e' in catch clause -tests/cases/compiler/redeclareParameterInCatchBlock.ts(11,9): error TS2492: Cannot redeclare identifier 'e' in catch clause -tests/cases/compiler/redeclareParameterInCatchBlock.ts(17,15): error TS2492: Cannot redeclare identifier 'b' in catch clause +tests/cases/compiler/redeclareParameterInCatchBlock.ts(5,11): error TS2492: Cannot redeclare identifier 'e' in catch clause. +tests/cases/compiler/redeclareParameterInCatchBlock.ts(11,9): error TS2492: Cannot redeclare identifier 'e' in catch clause. +tests/cases/compiler/redeclareParameterInCatchBlock.ts(17,15): error TS2492: Cannot redeclare identifier 'b' in catch clause. tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,15): error TS2451: Cannot redeclare block-scoped variable 'x'. tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,21): error TS2451: Cannot redeclare block-scoped variable 'x'. @@ -12,7 +12,7 @@ tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,21): error TS2451: Can } catch(e) { const e = null; ~ -!!! error TS2492: Cannot redeclare identifier 'e' in catch clause +!!! error TS2492: Cannot redeclare identifier 'e' in catch clause. } try { @@ -20,7 +20,7 @@ tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,21): error TS2451: Can } catch(e) { let e; ~ -!!! error TS2492: Cannot redeclare identifier 'e' in catch clause +!!! error TS2492: Cannot redeclare identifier 'e' in catch clause. } try { @@ -28,7 +28,7 @@ tests/cases/compiler/redeclareParameterInCatchBlock.ts(22,21): error TS2451: Can } catch ([a, b]) { const [c, b] = [0, 1]; ~ -!!! error TS2492: Cannot redeclare identifier 'b' in catch clause +!!! error TS2492: Cannot redeclare identifier 'b' in catch clause. } try { diff --git a/tests/baselines/reference/reservedNameOnInterfaceImport.errors.txt b/tests/baselines/reference/reservedNameOnInterfaceImport.errors.txt index dac57eae5ef..ddaa8fc7a4a 100644 --- a/tests/baselines/reference/reservedNameOnInterfaceImport.errors.txt +++ b/tests/baselines/reference/reservedNameOnInterfaceImport.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reservedNameOnInterfaceImport.ts(5,12): error TS2438: Import name cannot be 'string' +tests/cases/compiler/reservedNameOnInterfaceImport.ts(5,12): error TS2438: Import name cannot be 'string'. ==== tests/cases/compiler/reservedNameOnInterfaceImport.ts (1 errors) ==== @@ -8,6 +8,6 @@ tests/cases/compiler/reservedNameOnInterfaceImport.ts(5,12): error TS2438: Impor // Should error; 'test.istring' is a type, so this import conflicts with the 'string' type. import string = test.istring; ~~~~~~ -!!! error TS2438: Import name cannot be 'string' +!!! error TS2438: Import name cannot be 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/reservedNameOnModuleImportWithInterface.errors.txt b/tests/baselines/reference/reservedNameOnModuleImportWithInterface.errors.txt index 7704ff74013..860c8864e4c 100644 --- a/tests/baselines/reference/reservedNameOnModuleImportWithInterface.errors.txt +++ b/tests/baselines/reference/reservedNameOnModuleImportWithInterface.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts(6,12): error TS2438: Import name cannot be 'string' +tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts(6,12): error TS2438: Import name cannot be 'string'. ==== tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts (1 errors) ==== @@ -9,6 +9,6 @@ tests/cases/compiler/reservedNameOnModuleImportWithInterface.ts(6,12): error TS2 // Should error; imports both a type and a module, which means it conflicts with the 'string' type. import string = mi_string; ~~~~~~ -!!! error TS2438: Import name cannot be 'string' +!!! error TS2438: Import name cannot be 'string'. } \ No newline at end of file diff --git a/tests/baselines/reference/reservedNamesInAliases.errors.txt b/tests/baselines/reference/reservedNamesInAliases.errors.txt index 22894f8f6a6..fc5ed8ae9c9 100644 --- a/tests/baselines/reference/reservedNamesInAliases.errors.txt +++ b/tests/baselines/reference/reservedNamesInAliases.errors.txt @@ -1,28 +1,28 @@ -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(2,6): error TS2457: Type alias name cannot be 'any' -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(3,6): error TS2457: Type alias name cannot be 'number' -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(4,6): error TS2457: Type alias name cannot be 'boolean' -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(5,6): error TS2457: Type alias name cannot be 'string' +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(2,6): error TS2457: Type alias name cannot be 'any'. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(3,6): error TS2457: Type alias name cannot be 'number'. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(4,6): error TS2457: Type alias name cannot be 'boolean'. +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(5,6): error TS2457: Type alias name cannot be 'string'. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,1): error TS2304: Cannot find name 'type'. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,6): error TS1005: ';' expected. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,11): error TS1109: Expression expected. tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(6,13): error TS2693: 'I' only refers to a type, but is being used as a value here. -tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(7,6): error TS2457: Type alias name cannot be 'object' +tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(7,6): error TS2457: Type alias name cannot be 'object'. ==== tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts (9 errors) ==== interface I {} type any = I; ~~~ -!!! error TS2457: Type alias name cannot be 'any' +!!! error TS2457: Type alias name cannot be 'any'. type number = I; ~~~~~~ -!!! error TS2457: Type alias name cannot be 'number' +!!! error TS2457: Type alias name cannot be 'number'. type boolean = I; ~~~~~~~ -!!! error TS2457: Type alias name cannot be 'boolean' +!!! error TS2457: Type alias name cannot be 'boolean'. type string = I; ~~~~~~ -!!! error TS2457: Type alias name cannot be 'string' +!!! error TS2457: Type alias name cannot be 'string'. type void = I; ~~~~ !!! error TS2304: Cannot find name 'type'. @@ -34,5 +34,5 @@ tests/cases/conformance/types/typeAliases/reservedNamesInAliases.ts(7,6): error !!! error TS2693: 'I' only refers to a type, but is being used as a value here. type object = I; ~~~~~~ -!!! error TS2457: Type alias name cannot be 'object' +!!! error TS2457: Type alias name cannot be 'object'. \ No newline at end of file diff --git a/tests/baselines/reference/restElementMustBeLast.errors.txt b/tests/baselines/reference/restElementMustBeLast.errors.txt index 5eb5a4cd208..1eda6fbd011 100644 --- a/tests/baselines/reference/restElementMustBeLast.errors.txt +++ b/tests/baselines/reference/restElementMustBeLast.errors.txt @@ -1,12 +1,12 @@ -tests/cases/conformance/types/rest/restElementMustBeLast.ts(1,9): error TS2462: A rest element must be last in a destructuring pattern -tests/cases/conformance/types/rest/restElementMustBeLast.ts(2,2): error TS2462: A rest element must be last in a destructuring pattern +tests/cases/conformance/types/rest/restElementMustBeLast.ts(1,9): error TS2462: A rest element must be last in a destructuring pattern. +tests/cases/conformance/types/rest/restElementMustBeLast.ts(2,2): error TS2462: A rest element must be last in a destructuring pattern. ==== tests/cases/conformance/types/rest/restElementMustBeLast.ts (2 errors) ==== var [...a, x] = [1, 2, 3]; // Error, rest must be last element ~ -!!! error TS2462: A rest element must be last in a destructuring pattern +!!! error TS2462: A rest element must be last in a destructuring pattern. [...a, x] = [1, 2, 3]; // Error, rest must be last element ~~~~ -!!! error TS2462: A rest element must be last in a destructuring pattern +!!! error TS2462: A rest element must be last in a destructuring pattern. \ No newline at end of file diff --git a/tests/baselines/reference/returnInConstructor1.errors.txt b/tests/baselines/reference/returnInConstructor1.errors.txt index 939d303ec65..d4fb6a0b50e 100644 --- a/tests/baselines/reference/returnInConstructor1.errors.txt +++ b/tests/baselines/reference/returnInConstructor1.errors.txt @@ -1,15 +1,15 @@ tests/cases/compiler/returnInConstructor1.ts(11,9): error TS2322: Type '1' is not assignable to type 'B'. -tests/cases/compiler/returnInConstructor1.ts(11,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/compiler/returnInConstructor1.ts(11,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/compiler/returnInConstructor1.ts(25,9): error TS2322: Type '"test"' is not assignable to type 'D'. -tests/cases/compiler/returnInConstructor1.ts(25,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/compiler/returnInConstructor1.ts(25,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/compiler/returnInConstructor1.ts(39,9): error TS2322: Type '{ foo: number; }' is not assignable to type 'F'. Types of property 'foo' are incompatible. Type 'number' is not assignable to type 'string'. -tests/cases/compiler/returnInConstructor1.ts(39,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/compiler/returnInConstructor1.ts(39,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2322: Type 'G' is not assignable to type 'H'. Types of property 'foo' are incompatible. Type '() => void' is not assignable to type 'string'. -tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. ==== tests/cases/compiler/returnInConstructor1.ts (8 errors) ==== @@ -27,7 +27,7 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of ~~~~~~~~~ !!! error TS2322: Type '1' is not assignable to type 'B'. ~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } @@ -45,7 +45,7 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of ~~~~~~~~~~~~~~ !!! error TS2322: Type '"test"' is not assignable to type 'D'. ~~~~~~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } @@ -65,7 +65,7 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type 'number' is not assignable to type 'string'. ~~~~~~~~~~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } @@ -87,7 +87,7 @@ tests/cases/compiler/returnInConstructor1.ts(55,9): error TS2409: Return type of !!! error TS2322: Types of property 'foo' are incompatible. !!! error TS2322: Type '() => void' is not assignable to type 'string'. ~~~~~~~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } } diff --git a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt index 23d89cdf7ff..6e75f195c26 100644 --- a/tests/baselines/reference/scanner10.1.1-8gs.errors.txt +++ b/tests/baselines/reference/scanner10.1.1-8gs.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(16,7): error TS2304: Cannot find name 'NotEarlyError'. tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,1): error TS7027: Unreachable code detected. -tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode +tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ==== tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts (3 errors) ==== @@ -26,5 +26,5 @@ tests/cases/conformance/scanner/ecmascript5/scanner10.1.1-8gs.ts(17,5): error TS ~~~ !!! error TS7027: Unreachable code detected. ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/shadowedInternalModule.errors.txt b/tests/baselines/reference/shadowedInternalModule.errors.txt index 0873b1f0cf1..f278ebcb606 100644 --- a/tests/baselines/reference/shadowedInternalModule.errors.txt +++ b/tests/baselines/reference/shadowedInternalModule.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts(13,20): error TS2437: Module 'A' is hidden by a local declaration with the same name -tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts(30,5): error TS2440: Import declaration conflicts with local declaration of 'Y' +tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts(13,20): error TS2437: Module 'A' is hidden by a local declaration with the same name. +tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts(30,5): error TS2440: Import declaration conflicts with local declaration of 'Y'. ==== tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModule.ts (2 errors) ==== @@ -17,7 +17,7 @@ tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModul var A = { x: 0, y: 0 }; import Point = A; ~ -!!! error TS2437: Module 'A' is hidden by a local declaration with the same name +!!! error TS2437: Module 'A' is hidden by a local declaration with the same name. } module X { @@ -36,7 +36,7 @@ tests/cases/conformance/internalModules/importDeclarations/shadowedInternalModul module Z { import Y = X.Y; ~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'Y' +!!! error TS2440: Import declaration conflicts with local declaration of 'Y'. var Y = 12; } \ No newline at end of file diff --git a/tests/baselines/reference/strictModeReservedWord.errors.txt b/tests/baselines/reference/strictModeReservedWord.errors.txt index 7a1bacbb525..5a6de7792b7 100644 --- a/tests/baselines/reference/strictModeReservedWord.errors.txt +++ b/tests/baselines/reference/strictModeReservedWord.errors.txt @@ -1,45 +1,45 @@ tests/cases/compiler/strictModeReservedWord.ts(1,5): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. -tests/cases/compiler/strictModeReservedWord.ts(5,9): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(6,9): error TS1212: Identifier expected. 'static' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(7,9): error TS1212: Identifier expected. 'let' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(5,9): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(6,9): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(7,9): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(7,9): error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. -tests/cases/compiler/strictModeReservedWord.ts(8,9): error TS1212: Identifier expected. 'package' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(8,9): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(8,9): error TS2300: Duplicate identifier 'package'. -tests/cases/compiler/strictModeReservedWord.ts(9,14): error TS1212: Identifier expected. 'package' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(9,14): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(9,14): error TS2300: Duplicate identifier 'package'. -tests/cases/compiler/strictModeReservedWord.ts(10,18): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(10,27): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(10,39): error TS1212: Identifier expected. 'let' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(11,18): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(11,30): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(12,24): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(12,33): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(12,41): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(13,11): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(13,20): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(13,28): error TS1212: Identifier expected. 'package' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(10,18): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(10,27): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(10,39): error TS1212: Identifier expected. 'let' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(11,18): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(11,30): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(12,24): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(12,33): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(12,41): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(13,11): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(13,20): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(13,28): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(15,25): error TS1213: Identifier expected. 'package' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/compiler/strictModeReservedWord.ts(15,41): error TS1213: Identifier expected. 'public' is a reserved word in strict mode. Class definitions are automatically in strict mode. tests/cases/compiler/strictModeReservedWord.ts(15,41): error TS2507: Type 'number' is not a constructor function type. tests/cases/compiler/strictModeReservedWord.ts(17,9): error TS2300: Duplicate identifier 'b'. -tests/cases/compiler/strictModeReservedWord.ts(17,12): error TS1212: Identifier expected. 'public' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(17,12): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(17,12): error TS2503: Cannot find namespace 'public'. -tests/cases/compiler/strictModeReservedWord.ts(19,21): error TS1212: Identifier expected. 'private' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(19,21): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(19,21): error TS2503: Cannot find namespace 'private'. -tests/cases/compiler/strictModeReservedWord.ts(20,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(20,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(20,22): error TS2503: Cannot find namespace 'private'. -tests/cases/compiler/strictModeReservedWord.ts(20,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(21,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(20,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(21,22): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(21,22): error TS2503: Cannot find namespace 'private'. -tests/cases/compiler/strictModeReservedWord.ts(21,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(21,38): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(21,30): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(21,38): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(22,9): error TS2300: Duplicate identifier 'b'. -tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS2503: Cannot find namespace 'interface'. -tests/cases/compiler/strictModeReservedWord.ts(22,22): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord.ts(22,30): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(22,22): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord.ts(22,30): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(23,5): error TS2304: Cannot find name 'ublic'. -tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. @@ -52,51 +52,51 @@ tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invok "use strict" var public = 10; ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. var static = "hi"; ~~~~~~ -!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. let let = "blah"; ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. ~~~ !!! error TS2480: 'let' is not allowed to be used as a name in 'let' or 'const' declarations. var package = "hello" ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. ~~~~~~~ !!! error TS2300: Duplicate identifier 'package'. function package() { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. ~~~~~~~ !!! error TS2300: Duplicate identifier 'package'. function bar(private, implements, let) { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~~~~~ -!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. ~~~ -!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'let' is a reserved word in strict mode. function baz() { } ~~~~~~~~~~ -!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. function barn(cb: (private, public, package) => void) { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. barn((private, public, package) => { }); ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. var myClass = class package extends public {} ~~~~~~~ @@ -110,48 +110,48 @@ tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invok ~ !!! error TS2300: Duplicate identifier 'b'. ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ~~~~~~ !!! error TS2503: Cannot find namespace 'public'. function foo(x: private.x) { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~~ !!! error TS2503: Cannot find namespace 'private'. function foo1(x: private.package.x) { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~~ !!! error TS2503: Cannot find namespace 'private'. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. function foo2(x: private.package.protected) { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~~ !!! error TS2503: Cannot find namespace 'private'. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. let b: interface.package.implements.B; ~ !!! error TS2300: Duplicate identifier 'b'. ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'interface' is a reserved word in strict mode. ~~~~~~~~~ !!! error TS2503: Cannot find namespace 'interface'. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. ~~~~~~~~~~ -!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. ublic(); ~~~~~ !!! error TS2304: Cannot find name 'ublic'. static(); ~~~~~~ -!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. ~~~~~~~~ !!! error TS2349: Cannot invoke an expression whose type lacks a call signature. Type 'String' has no compatible call signatures. } diff --git a/tests/baselines/reference/strictModeReservedWord2.errors.txt b/tests/baselines/reference/strictModeReservedWord2.errors.txt index 8fbc79bbce0..39e8182c3d1 100644 --- a/tests/baselines/reference/strictModeReservedWord2.errors.txt +++ b/tests/baselines/reference/strictModeReservedWord2.errors.txt @@ -1,28 +1,28 @@ -tests/cases/compiler/strictModeReservedWord2.ts(2,11): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord2.ts(3,11): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord2.ts(4,9): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord2.ts(4,18): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord2.ts(6,6): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWord2.ts(13,12): error TS1212: Identifier expected. 'private' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWord2.ts(2,11): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord2.ts(3,11): error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord2.ts(4,9): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord2.ts(4,18): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord2.ts(6,6): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWord2.ts(13,12): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ==== tests/cases/compiler/strictModeReservedWord2.ts (6 errors) ==== "use strict" interface public { } ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. interface implements { ~~~~~~~~~~ -!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. foo(package, protected); ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. } enum package { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. enum foo { public, private, @@ -31,7 +31,7 @@ tests/cases/compiler/strictModeReservedWord2.ts(13,12): error TS1212: Identifier const enum private { ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. public, private, pacakge diff --git a/tests/baselines/reference/strictModeReservedWordInDestructuring.errors.txt b/tests/baselines/reference/strictModeReservedWordInDestructuring.errors.txt index 3ae9ca2d09a..488804ae1a7 100644 --- a/tests/baselines/reference/strictModeReservedWordInDestructuring.errors.txt +++ b/tests/baselines/reference/strictModeReservedWordInDestructuring.errors.txt @@ -1,32 +1,32 @@ -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(2,6): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(3,10): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(4,7): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(5,15): error TS1212: Identifier expected. 'static' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(5,38): error TS1212: Identifier expected. 'package' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(6,7): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInDestructuring.ts(6,15): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(2,6): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(3,10): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(4,7): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(5,15): error TS1212: Identifier expected. 'static' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(5,38): error TS1212: Identifier expected. 'package' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(6,7): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInDestructuring.ts(6,15): error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. ==== tests/cases/compiler/strictModeReservedWordInDestructuring.ts (7 errors) ==== "use strict" var [public] = [1]; ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. var { x: public } = { x: 1 }; ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. var [[private]] = [["hello"]]; ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. var { y: { s: static }, z: { o: { p: package } }} = { y: { s: 1 }, z: { o: { p: 'h' } } }; ~~~~~~ -!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. ~~~~~~~ -!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'package' is a reserved word in strict mode. var { public, protected } = { public: 1, protected: 2 }; ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ~~~~~~~~~ -!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'protected' is a reserved word in strict mode. var { public: a, protected: b } = { public: 1, protected: 2 }; \ No newline at end of file diff --git a/tests/baselines/reference/strictModeReservedWordInModuleDeclaration.errors.txt b/tests/baselines/reference/strictModeReservedWordInModuleDeclaration.errors.txt index f745f93f79e..43ee55f06c3 100644 --- a/tests/baselines/reference/strictModeReservedWordInModuleDeclaration.errors.txt +++ b/tests/baselines/reference/strictModeReservedWordInModuleDeclaration.errors.txt @@ -1,24 +1,24 @@ -tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(2,8): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(3,8): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(4,8): error TS1212: Identifier expected. 'public' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(6,8): error TS1212: Identifier expected. 'private' is a reserved word in strict mode -tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(6,16): error TS1212: Identifier expected. 'public' is a reserved word in strict mode +tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(2,8): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(3,8): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(4,8): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(6,8): error TS1212: Identifier expected. 'private' is a reserved word in strict mode. +tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts(6,16): error TS1212: Identifier expected. 'public' is a reserved word in strict mode. ==== tests/cases/compiler/strictModeReservedWordInModuleDeclaration.ts (5 errors) ==== "use strict" module public { } ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. module private { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. module public.whatever { ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. } module private.public.foo { } ~~~~~~~ -!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode +!!! error TS1212: Identifier expected. 'private' is a reserved word in strict mode. ~~~~~~ -!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode \ No newline at end of file +!!! error TS1212: Identifier expected. 'public' is a reserved word in strict mode. \ No newline at end of file diff --git a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt index 1a639a1c222..2534a07132e 100644 --- a/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt +++ b/tests/baselines/reference/stringLiteralTypesInVariableDeclarations01.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts(5,7): error TS1155: 'const' declarations must be initialized +tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts(5,7): error TS1155: 'const' declarations must be initialized. ==== tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarations01.ts (1 errors) ==== @@ -8,7 +8,7 @@ tests/cases/conformance/types/stringLiteral/stringLiteralTypesInVariableDeclarat let c: "bar"; const d: "baz"; ~ -!!! error TS1155: 'const' declarations must be initialized +!!! error TS1155: 'const' declarations must be initialized. a = ""; b = "foo"; diff --git a/tests/baselines/reference/superCallBeforeThisAccessing4.errors.txt b/tests/baselines/reference/superCallBeforeThisAccessing4.errors.txt index 91c3e7763f6..5ce0278ab60 100644 --- a/tests/baselines/reference/superCallBeforeThisAccessing4.errors.txt +++ b/tests/baselines/reference/superCallBeforeThisAccessing4.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(5,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' -tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(12,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(5,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. +tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(12,9): error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. ==== tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts (2 errors) ==== @@ -9,7 +9,7 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(12 this._t; super(); ~~~~~~~ -!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' +!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. } } @@ -18,7 +18,7 @@ tests/cases/conformance/es6/classDeclaration/superCallBeforeThisAccessing4.ts(12 constructor() { super(); ~~~~~~~ -!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null' +!!! error TS17005: A constructor cannot contain a 'super' call when its class extends 'null'. this._t; } } \ No newline at end of file diff --git a/tests/baselines/reference/symbolType2.errors.txt b/tests/baselines/reference/symbolType2.errors.txt index 441db917718..7ca8a6e7519 100644 --- a/tests/baselines/reference/symbolType2.errors.txt +++ b/tests/baselines/reference/symbolType2.errors.txt @@ -1,8 +1,8 @@ -tests/cases/conformance/es6/Symbols/symbolType2.ts(2,7): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter +tests/cases/conformance/es6/Symbols/symbolType2.ts(2,7): error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. ==== tests/cases/conformance/es6/Symbols/symbolType2.ts (1 errors) ==== Symbol.isConcatSpreadable in {}; "" in Symbol.toPrimitive; ~~~~~~~~~~~~~~~~~~ -!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter \ No newline at end of file +!!! error TS2361: The right-hand side of an 'in' expression must be of type 'any', an object type or a type parameter. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType20.errors.txt b/tests/baselines/reference/symbolType20.errors.txt index 41345e371f8..095dd808479 100644 --- a/tests/baselines/reference/symbolType20.errors.txt +++ b/tests/baselines/reference/symbolType20.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/Symbols/symbolType20.ts(1,11): error TS2427: Interface name cannot be 'symbol' +tests/cases/conformance/es6/Symbols/symbolType20.ts(1,11): error TS2427: Interface name cannot be 'symbol'. ==== tests/cases/conformance/es6/Symbols/symbolType20.ts (1 errors) ==== interface symbol { } ~~~~~~ -!!! error TS2427: Interface name cannot be 'symbol' \ No newline at end of file +!!! error TS2427: Interface name cannot be 'symbol'. \ No newline at end of file diff --git a/tests/baselines/reference/symbolType3.errors.txt b/tests/baselines/reference/symbolType3.errors.txt index 04a71789031..bd9754f7121 100644 --- a/tests/baselines/reference/symbolType3.errors.txt +++ b/tests/baselines/reference/symbolType3.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/es6/Symbols/symbolType3.ts(2,8): error TS2704: The operand of a delete operator cannot be a read-only property +tests/cases/conformance/es6/Symbols/symbolType3.ts(2,8): error TS2704: The operand of a delete operator cannot be a read-only property. tests/cases/conformance/es6/Symbols/symbolType3.ts(5,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/es6/Symbols/symbolType3.ts(6,3): error TS2356: An arithmetic operand must be of type 'any', 'number' or an enum type. tests/cases/conformance/es6/Symbols/symbolType3.ts(7,3): error TS2469: The '+' operator cannot be applied to type 'symbol'. @@ -11,7 +11,7 @@ tests/cases/conformance/es6/Symbols/symbolType3.ts(12,2): error TS2469: The '+' var s = Symbol(); delete Symbol.iterator; ~~~~~~~~~~~~~~~ -!!! error TS2704: The operand of a delete operator cannot be a read-only property +!!! error TS2704: The operand of a delete operator cannot be a read-only property. void Symbol.toPrimitive; typeof Symbol.toStringTag; ++s; diff --git a/tests/baselines/reference/targetTypeVoidFunc.errors.txt b/tests/baselines/reference/targetTypeVoidFunc.errors.txt index 6c0efe288bd..2afb8e95977 100644 --- a/tests/baselines/reference/targetTypeVoidFunc.errors.txt +++ b/tests/baselines/reference/targetTypeVoidFunc.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/targetTypeVoidFunc.ts(2,5): error TS2322: Type '() => void' is not assignable to type 'new () => number'. - Type '() => void' provides no match for the signature 'new (): number' + Type '() => void' provides no match for the signature 'new (): number'. ==== tests/cases/compiler/targetTypeVoidFunc.ts (1 errors) ==== @@ -7,7 +7,7 @@ tests/cases/compiler/targetTypeVoidFunc.ts(2,5): error TS2322: Type '() => void' return function () { return; } ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2322: Type '() => void' is not assignable to type 'new () => number'. -!!! error TS2322: Type '() => void' provides no match for the signature 'new (): number' +!!! error TS2322: Type '() => void' provides no match for the signature 'new (): number'. }; var x = f1(); diff --git a/tests/baselines/reference/templateStringInDeleteExpression.errors.txt b/tests/baselines/reference/templateStringInDeleteExpression.errors.txt index 6cc310969b6..2827231ebc5 100644 --- a/tests/baselines/reference/templateStringInDeleteExpression.errors.txt +++ b/tests/baselines/reference/templateStringInDeleteExpression.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts(1,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts(1,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/es6/templates/templateStringInDeleteExpression.ts (1 errors) ==== delete `abc${0}abc`; ~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/templateStringInDeleteExpressionES6.errors.txt b/tests/baselines/reference/templateStringInDeleteExpressionES6.errors.txt index a3b89c880c8..bdc53343fb1 100644 --- a/tests/baselines/reference/templateStringInDeleteExpressionES6.errors.txt +++ b/tests/baselines/reference/templateStringInDeleteExpressionES6.errors.txt @@ -1,7 +1,7 @@ -tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts(1,8): error TS2703: The operand of a delete operator must be a property reference +tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts(1,8): error TS2703: The operand of a delete operator must be a property reference. ==== tests/cases/conformance/es6/templates/templateStringInDeleteExpressionES6.ts (1 errors) ==== delete `abc${0}abc`; ~~~~~~~~~~~~ -!!! error TS2703: The operand of a delete operator must be a property reference \ No newline at end of file +!!! error TS2703: The operand of a delete operator must be a property reference. \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt index 7778f6c23c5..d746f35cbe7 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options module-kind is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015' +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015' +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt index 7778f6c23c5..d746f35cbe7 100644 --- a/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt +++ b/tests/baselines/reference/transpile/Report an error when compiler-options target-script is out-of-range.errors.txt @@ -1,6 +1,6 @@ -error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015' +error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. -!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015' +!!! error TS6046: Argument for '--module' option must be: 'none', 'commonjs', 'amd', 'system', 'umd', 'es6', 'es2015'. ==== file.ts (0 errors) ==== \ No newline at end of file diff --git a/tests/baselines/reference/tsxAttributeResolution16.js b/tests/baselines/reference/tsxAttributeResolution16.js new file mode 100644 index 00000000000..1182c886b94 --- /dev/null +++ b/tests/baselines/reference/tsxAttributeResolution16.js @@ -0,0 +1,53 @@ +//// [file.tsx] + +import React = require('react'); + +interface Address { + street: string; + country: string; +} + +interface CanadianAddress extends Address { + postalCode: string; +} + +interface AmericanAddress extends Address { + zipCode: string; +} + +type Properties = CanadianAddress | AmericanAddress; + +export class AddressComp extends React.Component { + public render() { + return null; + } +} + +let a = + +//// [file.jsx] +"use strict"; +var __extends = (this && this.__extends) || (function () { + var extendStatics = Object.setPrototypeOf || + ({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) || + function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; }; + return function (d, b) { + extendStatics(d, b); + function __() { this.constructor = d; } + d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __()); + }; +})(); +exports.__esModule = true; +var React = require("react"); +var AddressComp = (function (_super) { + __extends(AddressComp, _super); + function AddressComp() { + return _super !== null && _super.apply(this, arguments) || this; + } + AddressComp.prototype.render = function () { + return null; + }; + return AddressComp; +}(React.Component)); +exports.AddressComp = AddressComp; +var a = ; diff --git a/tests/baselines/reference/tsxAttributeResolution16.symbols b/tests/baselines/reference/tsxAttributeResolution16.symbols new file mode 100644 index 00000000000..0c271566de9 --- /dev/null +++ b/tests/baselines/reference/tsxAttributeResolution16.symbols @@ -0,0 +1,57 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : Symbol(React, Decl(file.tsx, 0, 0)) + +interface Address { +>Address : Symbol(Address, Decl(file.tsx, 1, 32)) + + street: string; +>street : Symbol(Address.street, Decl(file.tsx, 3, 19)) + + country: string; +>country : Symbol(Address.country, Decl(file.tsx, 4, 17)) +} + +interface CanadianAddress extends Address { +>CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 6, 1)) +>Address : Symbol(Address, Decl(file.tsx, 1, 32)) + + postalCode: string; +>postalCode : Symbol(CanadianAddress.postalCode, Decl(file.tsx, 8, 43)) +} + +interface AmericanAddress extends Address { +>AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 10, 1)) +>Address : Symbol(Address, Decl(file.tsx, 1, 32)) + + zipCode: string; +>zipCode : Symbol(AmericanAddress.zipCode, Decl(file.tsx, 12, 43)) +} + +type Properties = CanadianAddress | AmericanAddress; +>Properties : Symbol(Properties, Decl(file.tsx, 14, 1)) +>CanadianAddress : Symbol(CanadianAddress, Decl(file.tsx, 6, 1)) +>AmericanAddress : Symbol(AmericanAddress, Decl(file.tsx, 10, 1)) + +export class AddressComp extends React.Component { +>AddressComp : Symbol(AddressComp, Decl(file.tsx, 16, 52)) +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) +>React : Symbol(React, Decl(file.tsx, 0, 0)) +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) +>Properties : Symbol(Properties, Decl(file.tsx, 14, 1)) + + public render() { +>render : Symbol(AddressComp.render, Decl(file.tsx, 18, 68)) + + return null; + } +} + +let a = +>a : Symbol(a, Decl(file.tsx, 24, 3)) +>AddressComp : Symbol(AddressComp, Decl(file.tsx, 16, 52)) +>postalCode : Symbol(postalCode, Decl(file.tsx, 24, 20)) +>street : Symbol(street, Decl(file.tsx, 24, 41)) +>country : Symbol(country, Decl(file.tsx, 24, 60)) + diff --git a/tests/baselines/reference/tsxAttributeResolution16.types b/tests/baselines/reference/tsxAttributeResolution16.types new file mode 100644 index 00000000000..68134d7ac2d --- /dev/null +++ b/tests/baselines/reference/tsxAttributeResolution16.types @@ -0,0 +1,59 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : typeof React + +interface Address { +>Address : Address + + street: string; +>street : string + + country: string; +>country : string +} + +interface CanadianAddress extends Address { +>CanadianAddress : CanadianAddress +>Address : Address + + postalCode: string; +>postalCode : string +} + +interface AmericanAddress extends Address { +>AmericanAddress : AmericanAddress +>Address : Address + + zipCode: string; +>zipCode : string +} + +type Properties = CanadianAddress | AmericanAddress; +>Properties : CanadianAddress | AmericanAddress +>CanadianAddress : CanadianAddress +>AmericanAddress : AmericanAddress + +export class AddressComp extends React.Component { +>AddressComp : AddressComp +>React.Component : React.Component +>React : typeof React +>Component : typeof React.Component +>Properties : CanadianAddress | AmericanAddress + + public render() { +>render : () => any + + return null; +>null : null + } +} + +let a = +>a : JSX.Element +> : JSX.Element +>AddressComp : typeof AddressComp +>postalCode : string +>street : string +>country : string + diff --git a/tests/baselines/reference/tsxElementResolution12.errors.txt b/tests/baselines/reference/tsxElementResolution12.errors.txt index e55ec837332..1f481b756bd 100644 --- a/tests/baselines/reference/tsxElementResolution12.errors.txt +++ b/tests/baselines/reference/tsxElementResolution12.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property -tests/cases/conformance/jsx/file.tsx(25,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property +tests/cases/conformance/jsx/file.tsx(23,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property. +tests/cases/conformance/jsx/file.tsx(25,1): error TS2607: JSX element class does not support attributes because it does not have a 'pr' property. tests/cases/conformance/jsx/file.tsx(33,7): error TS2322: Type '{ x: "10"; }' is not assignable to type '{ x: number; }'. Types of property 'x' are incompatible. Type '"10"' is not assignable to type 'number'. @@ -30,11 +30,11 @@ tests/cases/conformance/jsx/file.tsx(33,7): error TS2322: Type '{ x: "10"; }' is var Obj3: Obj3type; ; // Error ~~~~~~~~~~~~~~~ -!!! error TS2607: JSX element class does not support attributes because it does not have a 'pr' property +!!! error TS2607: JSX element class does not support attributes because it does not have a 'pr' property. var attributes: any; ; // Error ~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2607: JSX element class does not support attributes because it does not have a 'pr' property +!!! error TS2607: JSX element class does not support attributes because it does not have a 'pr' property. ; // OK interface Obj4type { diff --git a/tests/baselines/reference/tsxElementResolution15.errors.txt b/tests/baselines/reference/tsxElementResolution15.errors.txt index 79cbd1a37af..35126294f67 100644 --- a/tests/baselines/reference/tsxElementResolution15.errors.txt +++ b/tests/baselines/reference/tsxElementResolution15.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property +tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property. ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -6,7 +6,7 @@ tests/cases/conformance/jsx/file.tsx(3,12): error TS2608: The global type 'JSX.E interface Element { } interface ElementAttributesProperty { pr1: any; pr2: any; } ~~~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property +!!! error TS2608: The global type 'JSX.ElementAttributesProperty' may not have more than one property. interface IntrinsicElements { } } diff --git a/tests/baselines/reference/tsxElementResolution16.errors.txt b/tests/baselines/reference/tsxElementResolution16.errors.txt index 1a887c39995..b68c442c36d 100644 --- a/tests/baselines/reference/tsxElementResolution16.errors.txt +++ b/tests/baselines/reference/tsxElementResolution16.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/jsx/file.tsx(8,1): error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. -tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. ==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== @@ -14,5 +14,5 @@ tests/cases/conformance/jsx/file.tsx(8,1): error TS7026: JSX element implicitly ~~~~~~~~~~~~~~~ !!! error TS2602: JSX element implicitly has type 'any' because the global type 'JSX.Element' does not exist. ~~~~~~~~~~~~~~~ -!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. \ No newline at end of file diff --git a/tests/baselines/reference/tsxElementResolution18.errors.txt b/tests/baselines/reference/tsxElementResolution18.errors.txt index 5b8468696c0..47dbbbd56f4 100644 --- a/tests/baselines/reference/tsxElementResolution18.errors.txt +++ b/tests/baselines/reference/tsxElementResolution18.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. ==== tests/cases/conformance/jsx/file1.tsx (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/conformance/jsx/file1.tsx(6,1): error TS7026: JSX element implicitly // Error under implicit any
; ~~~~~~~~~~~~~ -!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists +!!! error TS7026: JSX element implicitly has type 'any' because no interface 'JSX.IntrinsicElements' exists. \ No newline at end of file diff --git a/tests/baselines/reference/tsxErrorRecovery2.errors.txt b/tests/baselines/reference/tsxErrorRecovery2.errors.txt index 472b94654aa..b64bad49d5f 100644 --- a/tests/baselines/reference/tsxErrorRecovery2.errors.txt +++ b/tests/baselines/reference/tsxErrorRecovery2.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/jsx/file1.tsx(4,1): error TS2695: Left side of comma operator is unused and has no side effects. -tests/cases/conformance/jsx/file1.tsx(6,1): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/file1.tsx(6,1): error TS2657: JSX expressions must have one parent element. tests/cases/conformance/jsx/file2.tsx(1,9): error TS2695: Left side of comma operator is unused and has no side effects. -tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must have one parent element. ==== tests/cases/conformance/jsx/file1.tsx (2 errors) ==== @@ -14,11 +14,11 @@ tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must h
-!!! error TS2657: JSX expressions must have one parent element +!!! error TS2657: JSX expressions must have one parent element. ==== tests/cases/conformance/jsx/file2.tsx (2 errors) ==== var x =
~~~~~~~~~~~ !!! error TS2695: Left side of comma operator is unused and has no side effects. -!!! error TS2657: JSX expressions must have one parent element \ No newline at end of file +!!! error TS2657: JSX expressions must have one parent element. \ No newline at end of file diff --git a/tests/baselines/reference/tsxErrorRecovery3.errors.txt b/tests/baselines/reference/tsxErrorRecovery3.errors.txt index 5e7c5bffcb5..1c9e7bd8f41 100644 --- a/tests/baselines/reference/tsxErrorRecovery3.errors.txt +++ b/tests/baselines/reference/tsxErrorRecovery3.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/jsx/file1.tsx(4,1): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/conformance/jsx/file1.tsx(4,2): error TS2304: Cannot find name 'React'. tests/cases/conformance/jsx/file1.tsx(5,2): error TS2304: Cannot find name 'React'. -tests/cases/conformance/jsx/file1.tsx(6,1): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/file1.tsx(6,1): error TS2657: JSX expressions must have one parent element. tests/cases/conformance/jsx/file2.tsx(1,9): error TS2695: Left side of comma operator is unused and has no side effects. tests/cases/conformance/jsx/file2.tsx(1,10): error TS2304: Cannot find name 'React'. tests/cases/conformance/jsx/file2.tsx(1,21): error TS2304: Cannot find name 'React'. -tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must have one parent element +tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must have one parent element. ==== tests/cases/conformance/jsx/file1.tsx (4 errors) ==== @@ -22,7 +22,7 @@ tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must h !!! error TS2304: Cannot find name 'React'. -!!! error TS2657: JSX expressions must have one parent element +!!! error TS2657: JSX expressions must have one parent element. ==== tests/cases/conformance/jsx/file2.tsx (4 errors) ==== var x =
~~~~~~~~~~~ @@ -33,4 +33,4 @@ tests/cases/conformance/jsx/file2.tsx(2,1): error TS2657: JSX expressions must h !!! error TS2304: Cannot find name 'React'. -!!! error TS2657: JSX expressions must have one parent element \ No newline at end of file +!!! error TS2657: JSX expressions must have one parent element. \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt index c3bd7484fbf..968fa3764a8 100644 --- a/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt +++ b/tests/baselines/reference/tsxSpreadAttributesResolution6.errors.txt @@ -1,4 +1,7 @@ -tests/cases/conformance/jsx/file.tsx(14,10): error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. +tests/cases/conformance/jsx/file.tsx(14,24): error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'. + Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; }'. + Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'. + Property 'onEdit' is missing in type '{ editable: true; }'. ==== tests/cases/conformance/jsx/file.tsx (1 errors) ==== @@ -16,8 +19,11 @@ tests/cases/conformance/jsx/file.tsx(14,10): error TS2600: JSX element attribute // Error let x = - ~~~~~~~~~~~~~ -!!! error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. + ~~~~~~~~~~~~~~~ +!!! error TS2322: Type '{ editable: true; }' is not assignable to type '(IntrinsicAttributes & IntrinsicClassAttributes & { editable: false; } & { children?: ReactNode; }) | (IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })'. +!!! error TS2322: Type '{ editable: true; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & { editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; }'. +!!! error TS2322: Type '{ editable: true; }' is not assignable to type '{ editable: true; onEdit: (newText: string) => void; }'. +!!! error TS2322: Property 'onEdit' is missing in type '{ editable: true; }'. const textProps: TextProps = { editable: false diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt b/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt deleted file mode 100644 index c71459c4a38..00000000000 --- a/tests/baselines/reference/tsxSpreadAttributesResolution7.errors.txt +++ /dev/null @@ -1,34 +0,0 @@ -tests/cases/conformance/jsx/file.tsx(18,11): error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. -tests/cases/conformance/jsx/file.tsx(25,11): error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. - - -==== tests/cases/conformance/jsx/file.tsx (2 errors) ==== - - import React = require('react'); - - type TextProps = { editable: false } - | { editable: true, onEdit: (newText: string) => void }; - - class TextComponent extends React.Component { - render() { - return Some Text..; - } - } - - // OK - const textPropsFalse: TextProps = { - editable: false - }; - - let y1 = - ~~~~~~~~~~~~~ -!!! error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. - - const textPropsTrue: TextProps = { - editable: true, - onEdit: () => {} - }; - - let y2 = - ~~~~~~~~~~~~~ -!!! error TS2600: JSX element attributes type '({ editable: false; } & { children?: ReactNode; }) | ({ editable: true; onEdit: (newText: string) => void; } & { children?: ReactNode; })' may not be a union type. \ No newline at end of file diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols new file mode 100644 index 00000000000..f40b79ae616 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.symbols @@ -0,0 +1,62 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : Symbol(React, Decl(file.tsx, 0, 0)) + +type TextProps = { editable: false } +>TextProps : Symbol(TextProps, Decl(file.tsx, 1, 32)) +>editable : Symbol(editable, Decl(file.tsx, 3, 18)) + + | { editable: true, onEdit: (newText: string) => void }; +>editable : Symbol(editable, Decl(file.tsx, 4, 18)) +>onEdit : Symbol(onEdit, Decl(file.tsx, 4, 34)) +>newText : Symbol(newText, Decl(file.tsx, 4, 44)) + +class TextComponent extends React.Component { +>TextComponent : Symbol(TextComponent, Decl(file.tsx, 4, 71)) +>React.Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) +>React : Symbol(React, Decl(file.tsx, 0, 0)) +>Component : Symbol(React.Component, Decl(react.d.ts, 158, 55)) +>TextProps : Symbol(TextProps, Decl(file.tsx, 1, 32)) + + render() { +>render : Symbol(TextComponent.render, Decl(file.tsx, 6, 60)) + + return Some Text..; +>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2458, 51)) +>span : Symbol(JSX.IntrinsicElements.span, Decl(react.d.ts, 2458, 51)) + } +} + +// OK +const textPropsFalse: TextProps = { +>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 13, 5)) +>TextProps : Symbol(TextProps, Decl(file.tsx, 1, 32)) + + editable: false +>editable : Symbol(editable, Decl(file.tsx, 13, 35)) + +}; + +let y1 = +>y1 : Symbol(y1, Decl(file.tsx, 17, 3)) +>TextComponent : Symbol(TextComponent, Decl(file.tsx, 4, 71)) +>textPropsFalse : Symbol(textPropsFalse, Decl(file.tsx, 13, 5)) + +const textPropsTrue: TextProps = { +>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 19, 5)) +>TextProps : Symbol(TextProps, Decl(file.tsx, 1, 32)) + + editable: true, +>editable : Symbol(editable, Decl(file.tsx, 19, 34)) + + onEdit: () => {} +>onEdit : Symbol(onEdit, Decl(file.tsx, 20, 19)) + +}; + +let y2 = +>y2 : Symbol(y2, Decl(file.tsx, 24, 3)) +>TextComponent : Symbol(TextComponent, Decl(file.tsx, 4, 71)) +>textPropsTrue : Symbol(textPropsTrue, Decl(file.tsx, 19, 5)) + diff --git a/tests/baselines/reference/tsxSpreadAttributesResolution7.types b/tests/baselines/reference/tsxSpreadAttributesResolution7.types new file mode 100644 index 00000000000..db423de0904 --- /dev/null +++ b/tests/baselines/reference/tsxSpreadAttributesResolution7.types @@ -0,0 +1,72 @@ +=== tests/cases/conformance/jsx/file.tsx === + +import React = require('react'); +>React : typeof React + +type TextProps = { editable: false } +>TextProps : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } +>editable : false +>false : false + + | { editable: true, onEdit: (newText: string) => void }; +>editable : true +>true : true +>onEdit : (newText: string) => void +>newText : string + +class TextComponent extends React.Component { +>TextComponent : TextComponent +>React.Component : React.Component<{ editable: false; } | { editable: true; onEdit: (newText: string) => void; }, {}> +>React : typeof React +>Component : typeof React.Component +>TextProps : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } + + render() { +>render : () => JSX.Element + + return Some Text..; +>Some Text.. : JSX.Element +>span : any +>span : any + } +} + +// OK +const textPropsFalse: TextProps = { +>textPropsFalse : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } +>TextProps : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } +>{ editable: false} : { editable: false; } + + editable: false +>editable : boolean +>false : false + +}; + +let y1 = +>y1 : JSX.Element +> : JSX.Element +>TextComponent : typeof TextComponent +>textPropsFalse : { editable: false; } + +const textPropsTrue: TextProps = { +>textPropsTrue : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } +>TextProps : { editable: false; } | { editable: true; onEdit: (newText: string) => void; } +>{ editable: true, onEdit: () => {}} : { editable: true; onEdit: () => void; } + + editable: true, +>editable : boolean +>true : true + + onEdit: () => {} +>onEdit : () => void +>() => {} : () => void + +}; + +let y2 = +>y2 : JSX.Element +> : JSX.Element +>TextComponent : typeof TextComponent +>textPropsTrue : { editable: true; onEdit: (newText: string) => void; } + diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index e9dfbf5bf27..db5479f3946 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -48,7 +48,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,25) tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(98,27): error TS1005: ';' expected. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(104,25): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,9): error TS2322: Type 'true' is not assignable to type 'D'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(105,9): error TS2409: Return type of constructor signature must be assignable to the instance type of the class. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(107,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(110,20): error TS1228: A type predicate is only allowed in return type position for functions and methods. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(111,9): error TS2408: Setters cannot return a value. @@ -261,7 +261,7 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(137,39 ~~~~~~~~~~~~ !!! error TS2322: Type 'true' is not assignable to type 'D'. ~~~~~~~~~~~~ -!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class +!!! error TS2409: Return type of constructor signature must be assignable to the instance type of the class. } get m1(p1: A): p1 is C { ~~~~~~~ diff --git a/tests/baselines/reference/typeReferenceDirectives1.trace.json b/tests/baselines/reference/typeReferenceDirectives1.trace.json index 8532d21da89..64994ab00b5 100644 --- a/tests/baselines/reference/typeReferenceDirectives1.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives1.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives10.trace.json b/tests/baselines/reference/typeReferenceDirectives10.trace.json index 910ec0cafa6..a91414a8ce1 100644 --- a/tests/baselines/reference/typeReferenceDirectives10.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives10.trace.json @@ -1,9 +1,9 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './ref' from '/app.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -13,9 +13,9 @@ "File '/ref.d.ts' exist - use it as a name resolution result.", "======== Module name './ref' was successfully resolved to '/ref.d.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives11.trace.json b/tests/baselines/reference/typeReferenceDirectives11.trace.json index ae6786cba55..572648804ae 100644 --- a/tests/baselines/reference/typeReferenceDirectives11.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives11.trace.json @@ -5,9 +5,9 @@ "File '/mod1.ts' exist - use it as a name resolution result.", "======== Module name './mod1' was successfully resolved to '/mod1.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives12.trace.json b/tests/baselines/reference/typeReferenceDirectives12.trace.json index 96c6aee65ec..62a3b31fa1c 100644 --- a/tests/baselines/reference/typeReferenceDirectives12.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives12.trace.json @@ -10,18 +10,18 @@ "File '/mod1.ts' exist - use it as a name resolution result.", "======== Module name './mod1' was successfully resolved to '/mod1.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/mod1.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './main' from '/mod1.ts'. ========", "Resolution for module './main' was found in cache.", "======== Module name './main' was successfully resolved to '/main.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives13.trace.json b/tests/baselines/reference/typeReferenceDirectives13.trace.json index 910ec0cafa6..a91414a8ce1 100644 --- a/tests/baselines/reference/typeReferenceDirectives13.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives13.trace.json @@ -1,9 +1,9 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './ref' from '/app.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -13,9 +13,9 @@ "File '/ref.d.ts' exist - use it as a name resolution result.", "======== Module name './ref' was successfully resolved to '/ref.d.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives2.trace.json b/tests/baselines/reference/typeReferenceDirectives2.trace.json index 1258ecdaa2b..47ae2761584 100644 --- a/tests/baselines/reference/typeReferenceDirectives2.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives2.trace.json @@ -1,8 +1,8 @@ [ "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives3.trace.json b/tests/baselines/reference/typeReferenceDirectives3.trace.json index 8532d21da89..64994ab00b5 100644 --- a/tests/baselines/reference/typeReferenceDirectives3.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives3.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives4.trace.json b/tests/baselines/reference/typeReferenceDirectives4.trace.json index 8532d21da89..64994ab00b5 100644 --- a/tests/baselines/reference/typeReferenceDirectives4.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives4.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives5.trace.json b/tests/baselines/reference/typeReferenceDirectives5.trace.json index 910ec0cafa6..a91414a8ce1 100644 --- a/tests/baselines/reference/typeReferenceDirectives5.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives5.trace.json @@ -1,9 +1,9 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './ref' from '/app.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -13,9 +13,9 @@ "File '/ref.d.ts' exist - use it as a name resolution result.", "======== Module name './ref' was successfully resolved to '/ref.d.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives6.trace.json b/tests/baselines/reference/typeReferenceDirectives6.trace.json index 8532d21da89..64994ab00b5 100644 --- a/tests/baselines/reference/typeReferenceDirectives6.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives6.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives7.trace.json b/tests/baselines/reference/typeReferenceDirectives7.trace.json index 8532d21da89..64994ab00b5 100644 --- a/tests/baselines/reference/typeReferenceDirectives7.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives7.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'lib', containing file '/app.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives8.trace.json b/tests/baselines/reference/typeReferenceDirectives8.trace.json index ae6786cba55..572648804ae 100644 --- a/tests/baselines/reference/typeReferenceDirectives8.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives8.trace.json @@ -5,9 +5,9 @@ "File '/mod1.ts' exist - use it as a name resolution result.", "======== Module name './mod1' was successfully resolved to '/mod1.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeReferenceDirectives9.trace.json b/tests/baselines/reference/typeReferenceDirectives9.trace.json index 96c6aee65ec..62a3b31fa1c 100644 --- a/tests/baselines/reference/typeReferenceDirectives9.trace.json +++ b/tests/baselines/reference/typeReferenceDirectives9.trace.json @@ -10,18 +10,18 @@ "File '/mod1.ts' exist - use it as a name resolution result.", "======== Module name './mod1' was successfully resolved to '/mod1.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/mod1.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========", "======== Resolving module './main' from '/mod1.ts'. ========", "Resolution for module './main' was found in cache.", "======== Module name './main' was successfully resolved to '/main.ts'. ========", "======== Resolving type reference directive 'lib', containing file '/__inferred type names__.ts', root directory '/types'. ========", - "Resolving with primary search path '/types'", + "Resolving with primary search path '/types'.", "File '/types/lib/package.json' does not exist.", "File '/types/lib/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'", + "Resolving real path for '/types/lib/index.d.ts', result '/types/lib/index.d.ts'.", "======== Type reference directive 'lib' was successfully resolved to '/types/lib/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json index 8074424995e..fdcbcdb7ab1 100644 --- a/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json +++ b/tests/baselines/reference/typeRootsFromMultipleNodeModulesDirectories.trace.json @@ -57,21 +57,21 @@ "File '/node_modules/abc.jsx' does not exist.", "======== Module name 'abc' was not resolved. ========", "======== Resolving type reference directive 'grumpy', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/node_modules/@types,/node_modules/@types'. ========", - "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'", + "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'.", "File '/foo/node_modules/@types/grumpy/package.json' does not exist.", "File '/foo/node_modules/@types/grumpy/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/foo/node_modules/@types/grumpy/index.d.ts', result '/foo/node_modules/@types/grumpy/index.d.ts'", + "Resolving real path for '/foo/node_modules/@types/grumpy/index.d.ts', result '/foo/node_modules/@types/grumpy/index.d.ts'.", "======== Type reference directive 'grumpy' was successfully resolved to '/foo/node_modules/@types/grumpy/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'sneezy', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/node_modules/@types,/node_modules/@types'. ========", - "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'", + "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'.", "File '/foo/node_modules/@types/sneezy/package.json' does not exist.", "File '/foo/node_modules/@types/sneezy/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/foo/node_modules/@types/sneezy/index.d.ts', result '/foo/node_modules/@types/sneezy/index.d.ts'", + "Resolving real path for '/foo/node_modules/@types/sneezy/index.d.ts', result '/foo/node_modules/@types/sneezy/index.d.ts'.", "======== Type reference directive 'sneezy' was successfully resolved to '/foo/node_modules/@types/sneezy/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'dopey', containing file '/foo/bar/__inferred type names__.ts', root directory '/foo/node_modules/@types,/node_modules/@types'. ========", - "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'", + "Resolving with primary search path '/foo/node_modules/@types, /node_modules/@types'.", "File '/node_modules/@types/dopey/package.json' does not exist.", "File '/node_modules/@types/dopey/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/dopey/index.d.ts', result '/node_modules/@types/dopey/index.d.ts'", + "Resolving real path for '/node_modules/@types/dopey/index.d.ts', result '/node_modules/@types/dopey/index.d.ts'.", "======== Type reference directive 'dopey' was successfully resolved to '/node_modules/@types/dopey/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json index dc21070f1ae..a15e20239c6 100644 --- a/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json +++ b/tests/baselines/reference/typeRootsFromNodeModulesInParentDirectory.trace.json @@ -13,9 +13,9 @@ "File '/node_modules/xyz.jsx' does not exist.", "======== Module name 'xyz' was not resolved. ========", "======== Resolving type reference directive 'foo', containing file '/src/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/foo/package.json' does not exist.", "File '/node_modules/@types/foo/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/foo/index.d.ts', result '/node_modules/@types/foo/index.d.ts'", + "Resolving real path for '/node_modules/@types/foo/index.d.ts', result '/node_modules/@types/foo/index.d.ts'.", "======== Type reference directive 'foo' was successfully resolved to '/node_modules/@types/foo/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typesWithPublicConstructor.errors.txt b/tests/baselines/reference/typesWithPublicConstructor.errors.txt index 54bee79dae0..17abc57f6df 100644 --- a/tests/baselines/reference/typesWithPublicConstructor.errors.txt +++ b/tests/baselines/reference/typesWithPublicConstructor.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(8,5): error TS2322: Type 'Function' is not assignable to type '() => void'. - Type 'Function' provides no match for the signature '(): void' + Type 'Function' provides no match for the signature '(): void'. tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): error TS2346: Supplied parameters do not match any signature of call target. @@ -14,7 +14,7 @@ tests/cases/conformance/types/members/typesWithPublicConstructor.ts(15,10): erro var r: () => void = c.constructor; ~ !!! error TS2322: Type 'Function' is not assignable to type '() => void'. -!!! error TS2322: Type 'Function' provides no match for the signature '(): void' +!!! error TS2322: Type 'Function' provides no match for the signature '(): void'. class C2 { public constructor(x: number); diff --git a/tests/baselines/reference/typingsLookup1.trace.json b/tests/baselines/reference/typingsLookup1.trace.json index 9445b8564d9..9efcb84d490 100644 --- a/tests/baselines/reference/typingsLookup1.trace.json +++ b/tests/baselines/reference/typingsLookup1.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/jquery/package.json' does not exist.", "File '/node_modules/@types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/jquery/package.json' does not exist.", "File '/node_modules/@types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typingsLookup3.trace.json b/tests/baselines/reference/typingsLookup3.trace.json index 9445b8564d9..9efcb84d490 100644 --- a/tests/baselines/reference/typingsLookup3.trace.json +++ b/tests/baselines/reference/typingsLookup3.trace.json @@ -1,14 +1,14 @@ [ "======== Resolving type reference directive 'jquery', containing file '/a.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/jquery/package.json' does not exist.", "File '/node_modules/@types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ========", "======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/jquery/package.json' does not exist.", "File '/node_modules/@types/jquery/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/index.d.ts', result '/node_modules/@types/jquery/index.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typingsLookup4.trace.json b/tests/baselines/reference/typingsLookup4.trace.json index 332d9ffa416..d2087308d8e 100644 --- a/tests/baselines/reference/typingsLookup4.trace.json +++ b/tests/baselines/reference/typingsLookup4.trace.json @@ -9,7 +9,7 @@ "Found 'package.json' at '/node_modules/@types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'.", "File '/node_modules/@types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'.", "======== Module name 'jquery' was successfully resolved to '/node_modules/@types/jquery/jquery.d.ts'. ========", "======== Resolving module 'kquery' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -25,7 +25,7 @@ "File '/node_modules/@types/kquery/kquery.ts' does not exist.", "File '/node_modules/@types/kquery/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery/kquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/kquery/kquery.d.ts', result '/node_modules/@types/kquery/kquery.d.ts'", + "Resolving real path for '/node_modules/@types/kquery/kquery.d.ts', result '/node_modules/@types/kquery/kquery.d.ts'.", "======== Module name 'kquery' was successfully resolved to '/node_modules/@types/kquery/kquery.d.ts'. ========", "======== Resolving module 'lquery' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -39,7 +39,7 @@ "File '/node_modules/@types/lquery/lquery' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/@types/lquery/lquery', target file type 'TypeScript'.", "File '/node_modules/@types/lquery/lquery.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/lquery/lquery.ts', result '/node_modules/@types/lquery/lquery.ts'", + "Resolving real path for '/node_modules/@types/lquery/lquery.ts', result '/node_modules/@types/lquery/lquery.ts'.", "======== Module name 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts'. ========", "======== Resolving module 'mquery' from '/a.ts'. ========", "Module resolution kind is not specified, using 'NodeJs'.", @@ -57,17 +57,17 @@ "File '/node_modules/@types/mquery/mquery.d.ts' does not exist.", "File '/node_modules/@types/mquery/mquery/index.ts' does not exist.", "File '/node_modules/@types/mquery/mquery/index.tsx' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'", + "Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'.", "======== Module name 'mquery' was successfully resolved to '/node_modules/@types/mquery/mquery/index.tsx'. ========", "======== Resolving type reference directive 'jquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "Found 'package.json' at '/node_modules/@types/jquery/package.json'.", "'package.json' has 'typings' field 'jquery.d.ts' that references '/node_modules/@types/jquery/jquery.d.ts'.", "File '/node_modules/@types/jquery/jquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'", + "Resolving real path for '/node_modules/@types/jquery/jquery.d.ts', result '/node_modules/@types/jquery/jquery.d.ts'.", "======== Type reference directive 'jquery' was successfully resolved to '/node_modules/@types/jquery/jquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'kquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "Found 'package.json' at '/node_modules/@types/kquery/package.json'.", "'package.json' has 'typings' field 'kquery' that references '/node_modules/@types/kquery/kquery'.", "File '/node_modules/@types/kquery/kquery' does not exist.", @@ -75,19 +75,19 @@ "File '/node_modules/@types/kquery/kquery.ts' does not exist.", "File '/node_modules/@types/kquery/kquery.tsx' does not exist.", "File '/node_modules/@types/kquery/kquery.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/kquery/kquery.d.ts', result '/node_modules/@types/kquery/kquery.d.ts'", + "Resolving real path for '/node_modules/@types/kquery/kquery.d.ts', result '/node_modules/@types/kquery/kquery.d.ts'.", "======== Type reference directive 'kquery' was successfully resolved to '/node_modules/@types/kquery/kquery.d.ts', primary: true. ========", "======== Resolving type reference directive 'lquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "Found 'package.json' at '/node_modules/@types/lquery/package.json'.", "'package.json' has 'typings' field 'lquery' that references '/node_modules/@types/lquery/lquery'.", "File '/node_modules/@types/lquery/lquery' does not exist.", "Loading module as file / folder, candidate module location '/node_modules/@types/lquery/lquery', target file type 'TypeScript'.", "File '/node_modules/@types/lquery/lquery.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/lquery/lquery.ts', result '/node_modules/@types/lquery/lquery.ts'", + "Resolving real path for '/node_modules/@types/lquery/lquery.ts', result '/node_modules/@types/lquery/lquery.ts'.", "======== Type reference directive 'lquery' was successfully resolved to '/node_modules/@types/lquery/lquery.ts', primary: true. ========", "======== Resolving type reference directive 'mquery', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "Found 'package.json' at '/node_modules/@types/mquery/package.json'.", "'package.json' has 'typings' field 'mquery' that references '/node_modules/@types/mquery/mquery'.", "File '/node_modules/@types/mquery/mquery' does not exist.", @@ -97,6 +97,6 @@ "File '/node_modules/@types/mquery/mquery.d.ts' does not exist.", "File '/node_modules/@types/mquery/mquery/index.ts' does not exist.", "File '/node_modules/@types/mquery/mquery/index.tsx' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'", + "Resolving real path for '/node_modules/@types/mquery/mquery/index.tsx', result '/node_modules/@types/mquery/mquery/index.tsx'.", "======== Type reference directive 'mquery' was successfully resolved to '/node_modules/@types/mquery/mquery/index.tsx', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/typingsLookupAmd.trace.json b/tests/baselines/reference/typingsLookupAmd.trace.json index 49abda2815d..ca64cf8fdf4 100644 --- a/tests/baselines/reference/typingsLookupAmd.trace.json +++ b/tests/baselines/reference/typingsLookupAmd.trace.json @@ -40,9 +40,9 @@ "File '/node_modules/@types/a/index.d.ts' exist - use it as a name resolution result.", "======== Module name 'a' was successfully resolved to '/node_modules/@types/a/index.d.ts'. ========", "======== Resolving type reference directive 'a', containing file '/__inferred type names__.ts', root directory '/node_modules/@types'. ========", - "Resolving with primary search path '/node_modules/@types'", + "Resolving with primary search path '/node_modules/@types'.", "File '/node_modules/@types/a/package.json' does not exist.", "File '/node_modules/@types/a/index.d.ts' exist - use it as a name resolution result.", - "Resolving real path for '/node_modules/@types/a/index.d.ts', result '/node_modules/@types/a/index.d.ts'", + "Resolving real path for '/node_modules/@types/a/index.d.ts', result '/node_modules/@types/a/index.d.ts'.", "======== Type reference directive 'a' was successfully resolved to '/node_modules/@types/a/index.d.ts', primary: true. ========" ] \ No newline at end of file diff --git a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt index 66270913c9f..1ca223783bf 100644 --- a/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt +++ b/tests/baselines/reference/varNameConflictsWithImportInDifferentPartOfModule.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts(6,5): error TS2440: Import declaration conflicts with local declaration of 'q' +tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts(6,5): error TS2440: Import declaration conflicts with local declaration of 'q'. ==== tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts (1 errors) ==== @@ -9,5 +9,5 @@ tests/cases/compiler/varNameConflictsWithImportInDifferentPartOfModule.ts(6,5): module M1 { export import q = M1.s; // Should be an error but isn't ~~~~~~~~~~~~~~~~~~~~~~~ -!!! error TS2440: Import declaration conflicts with local declaration of 'q' +!!! error TS2440: Import declaration conflicts with local declaration of 'q'. } \ No newline at end of file diff --git a/tests/cases/compiler/baseConstraintOfDecorator.ts b/tests/cases/compiler/baseConstraintOfDecorator.ts new file mode 100644 index 00000000000..d8eb00f07da --- /dev/null +++ b/tests/cases/compiler/baseConstraintOfDecorator.ts @@ -0,0 +1,8 @@ +export function classExtender(superClass: TFunction, _instanceModifier: (instance: any, args: any[]) => void): TFunction { + return class decoratorFunc extends superClass { + constructor(...args: any[]) { + super(...args); + _instanceModifier(this, args); + } + }; +} diff --git a/tests/cases/compiler/evalAfter0.ts b/tests/cases/compiler/evalAfter0.ts new file mode 100644 index 00000000000..2245150ce6a --- /dev/null +++ b/tests/cases/compiler/evalAfter0.ts @@ -0,0 +1,4 @@ +(0,eval)("10"); // fine: special case for eval + +declare var eva; +(0,eva)("10"); // error: no side effect left of comma (suspect of missing method name or something) \ No newline at end of file diff --git a/tests/cases/compiler/extendsUntypedModule.ts b/tests/cases/compiler/extendsUntypedModule.ts new file mode 100644 index 00000000000..8eaf6b3833a --- /dev/null +++ b/tests/cases/compiler/extendsUntypedModule.ts @@ -0,0 +1,9 @@ +// Test that extending an untyped module is an error, unlike extending unknownSymbol. +// @noImplicitReferences: true + +// @Filename: /node_modules/foo/index.js +This file is not read. + +// @Filename: /a.ts +import Foo from "foo"; +class A extends Foo { } diff --git a/tests/cases/compiler/misspelledNewMetaProperty.ts b/tests/cases/compiler/misspelledNewMetaProperty.ts new file mode 100644 index 00000000000..8882264478c --- /dev/null +++ b/tests/cases/compiler/misspelledNewMetaProperty.ts @@ -0,0 +1 @@ +function foo(){new.targ} \ No newline at end of file diff --git a/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx b/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx new file mode 100644 index 00000000000..811a1b47174 --- /dev/null +++ b/tests/cases/conformance/jsx/tsxAttributeResolution16.tsx @@ -0,0 +1,29 @@ +// @filename: file.tsx +// @jsx: preserve +// @noLib: true +// @libFiles: react.d.ts,lib.d.ts + +import React = require('react'); + +interface Address { + street: string; + country: string; +} + +interface CanadianAddress extends Address { + postalCode: string; +} + +interface AmericanAddress extends Address { + zipCode: string; +} + +type Properties = CanadianAddress | AmericanAddress; + +export class AddressComp extends React.Component { + public render() { + return null; + } +} + +let a = \ No newline at end of file diff --git a/tests/cases/conformance/salsa/jsDocTypes.ts b/tests/cases/conformance/salsa/jsDocTypes.ts new file mode 100644 index 00000000000..9a13c533d0a --- /dev/null +++ b/tests/cases/conformance/salsa/jsDocTypes.ts @@ -0,0 +1,80 @@ +// @allowJS: true +// @suppressOutputPathCheck: true +// @strictNullChecks: true + +// @filename: a.js +/** @type {String} */ +var S; + +/** @type {string} */ +var s; + +/** @type {Number} */ +var N; + +/** @type {number} */ +var n; + +/** @type {Boolean} */ +var B; + +/** @type {boolean} */ +var b; + +/** @type {Void} */ +var V; + +/** @type {void} */ +var v; + +/** @type {Undefined} */ +var U; + +/** @type {undefined} */ +var u; + +/** @type {Null} */ +var Nl; + +/** @type {null} */ +var nl; + +/** @type {Array} */ +var A; + +/** @type {array} */ +var a; + +/** @type {Promise} */ +var P; + +/** @type {promise} */ +var p; + +/** @type {?number} */ +var nullable; + +/** @type {Object} */ +var Obj; + + + +// @filename: b.ts +var S: string; +var s: string; +var N: number; +var n: number +var B: boolean; +var b: boolean; +var V :void; +var v: void; +var U: undefined; +var u: undefined; +var Nl: null; +var nl: null; +var A: any[]; +var a: any[]; +var P: Promise; +var p: Promise; +var nullable: number | null; +var Obj: any; diff --git a/tests/cases/fourslash/fourslash.ts b/tests/cases/fourslash/fourslash.ts index 34afb71ec85..ab83752d93b 100644 --- a/tests/cases/fourslash/fourslash.ts +++ b/tests/cases/fourslash/fourslash.ts @@ -92,6 +92,7 @@ declare namespace FourSlashInterface { InsertSpaceAfterFunctionKeywordForAnonymousFunctions: boolean; InsertSpaceAfterOpeningAndBeforeClosingNonemptyParenthesis: boolean; InsertSpaceAfterOpeningAndBeforeClosingNonemptyBrackets: boolean; + InsertSpaceAfterOpeningAndBeforeClosingNonemptyBraces: boolean; InsertSpaceAfterOpeningAndBeforeClosingTemplateStringBraces: boolean; InsertSpaceAfterTypeAssertion: boolean; PlaceOpenBraceOnNewLineForFunctions: boolean; diff --git a/tests/cases/fourslash/goToDefinition_untypedModule.ts b/tests/cases/fourslash/goToDefinition_untypedModule.ts new file mode 100644 index 00000000000..b4571438434 --- /dev/null +++ b/tests/cases/fourslash/goToDefinition_untypedModule.ts @@ -0,0 +1,10 @@ +/// + +// @Filename: /node_modules/foo/index.js +////not read + +// @Filename: /a.ts +////import { f } from "foo"; +/////**/f(); + +verify.goToDefinition("", []); diff --git a/tests/cases/fourslash/renameJsSpecialAssignmentRhs1.ts b/tests/cases/fourslash/renameJsSpecialAssignmentRhs1.ts new file mode 100644 index 00000000000..b4b9fb80528 --- /dev/null +++ b/tests/cases/fourslash/renameJsSpecialAssignmentRhs1.ts @@ -0,0 +1,13 @@ +/// +// @allowJs: true +// @Filename: a.js +////const foo = { +//// set: function (x) { +//// this._x = x; +//// }, +//// copy: function ([|x|]) { +//// this._x = /**/[|x|].prop; +//// } +////}; +goTo.marker(); +verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); diff --git a/tests/cases/fourslash/renameJsSpecialAssignmentRhs2.ts b/tests/cases/fourslash/renameJsSpecialAssignmentRhs2.ts new file mode 100644 index 00000000000..5b4b6e851cf --- /dev/null +++ b/tests/cases/fourslash/renameJsSpecialAssignmentRhs2.ts @@ -0,0 +1,13 @@ +/// +// @allowJs: true +// @Filename: a.js +////const foo = { +//// set: function (x) { +//// this._x = x; +//// }, +//// copy: function (/**/[|x|]) { +//// this._x = [|x|].prop; +//// } +////}; +goTo.marker(); +verify.renameLocations(/*findInStrings*/ false, /*findInComments*/ false); diff --git a/tests/cases/fourslash/server/jsdocTypedefTag1.ts b/tests/cases/fourslash/server/jsdocTypedefTag1.ts new file mode 100644 index 00000000000..273dc1002af --- /dev/null +++ b/tests/cases/fourslash/server/jsdocTypedefTag1.ts @@ -0,0 +1,20 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: jsdocCompletion_typedef.js + +//// /** +//// * @typedef {Object} MyType +//// * @property {string} yes +//// */ +//// function foo() { } + +//// /** +//// * @param {MyType} my +//// */ +//// function a(my) { +//// my.yes./*1*/ +//// } + +goTo.marker('1'); +verify.completionListContains('charAt'); \ No newline at end of file diff --git a/tests/cases/fourslash/server/jsdocTypedefTag2.ts b/tests/cases/fourslash/server/jsdocTypedefTag2.ts new file mode 100644 index 00000000000..60210935210 --- /dev/null +++ b/tests/cases/fourslash/server/jsdocTypedefTag2.ts @@ -0,0 +1,30 @@ +/// + +// @allowNonTsExtensions: true +// @Filename: jsdocCompletion_typedef.js + +//// /** +//// * @typedef {Object} A.B.MyType +//// * @property {string} yes +//// */ +//// function foo() {} + +//// /** +//// * @param {A.B.MyType} my2 +//// */ +//// function a(my2) { +//// my2.yes./*1*/ +//// } + +//// /** +//// * @param {MyType} my2 +//// */ +//// function b(my2) { +//// my2.yes./*2*/ +//// } + + +goTo.marker('1'); +verify.completionListContains('charAt'); +goTo.marker('2'); +verify.not.completionListContains('charAt'); \ No newline at end of file diff --git a/tests/cases/fourslash/untypedModuleImport.ts b/tests/cases/fourslash/untypedModuleImport.ts index 1854010d5b6..433c584e3cf 100644 --- a/tests/cases/fourslash/untypedModuleImport.ts +++ b/tests/cases/fourslash/untypedModuleImport.ts @@ -12,7 +12,7 @@ verify.numberOfErrorsInCurrentFile(0); goTo.marker("fooModule"); verify.goToDefinitionIs([]); -verify.quickInfoIs(""); +verify.quickInfoIs("module "); verify.noReferences(); goTo.marker("foo");