diff --git a/src/compiler/checker.ts b/src/compiler/checker.ts index 374e6ef311780..eaa28767166c2 100644 --- a/src/compiler/checker.ts +++ b/src/compiler/checker.ts @@ -205,6 +205,8 @@ namespace ts { return tryFindAmbientModule(moduleName, /*withAugmentations*/ false); }, getApparentType, + getSuggestionForNonexistentProperty, + getSuggestionForNonexistentSymbol, getBaseConstraintOfType, }; @@ -317,6 +319,8 @@ namespace ts { const resolutionResults: boolean[] = []; const resolutionPropertyNames: TypeSystemPropertyName[] = []; + let suggestionCount = 0; + const maximumSuggestionCount = 10; const mergedSymbols: Symbol[] = []; const symbolLinks: SymbolLinks[] = []; const nodeLinks: NodeLinks[] = []; @@ -841,7 +845,25 @@ namespace ts { // Resolve a given name for a given meaning at a given location. An error is reported if the name was not found and // the nameNotFoundMessage argument is not undefined. Returns the resolved symbol, or undefined if no symbol with // the given name can be found. - function resolveName(location: Node | undefined, name: string, meaning: SymbolFlags, nameNotFoundMessage: DiagnosticMessage, nameArg: string | Identifier): Symbol { + function resolveName( + location: Node | undefined, + name: string, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage, + nameArg: string | Identifier, + suggestedNameNotFoundMessage?: DiagnosticMessage): Symbol { + return resolveNameHelper(location, name, meaning, nameNotFoundMessage, nameArg, getSymbol, suggestedNameNotFoundMessage); + } + + function resolveNameHelper( + location: Node | undefined, + name: string, + meaning: SymbolFlags, + nameNotFoundMessage: DiagnosticMessage, + nameArg: string | Identifier, + lookup: (symbols: SymbolTable, name: string, meaning: SymbolFlags) => Symbol, + suggestedNameNotFoundMessage?: DiagnosticMessage): Symbol { + const originalLocation = location; // needed for did-you-mean error reporting, which gathers candidates starting from the original location let result: Symbol; let lastLocation: Node; let propertyWithInvalidInitializer: Node; @@ -852,7 +874,7 @@ namespace ts { loop: while (location) { // Locals of a source file are not in scope (because they get merged into the global symbol table) if (location.locals && !isGlobalSourceFile(location)) { - if (result = getSymbol(location.locals, name, meaning)) { + if (result = lookup(location.locals, name, meaning)) { let useResult = true; if (isFunctionLike(location) && lastLocation && lastLocation !== (location).body) { // symbol lookup restrictions for function-like declarations @@ -930,12 +952,12 @@ namespace ts { } } - if (result = getSymbol(moduleExports, name, meaning & SymbolFlags.ModuleMember)) { + if (result = lookup(moduleExports, name, meaning & SymbolFlags.ModuleMember)) { break loop; } break; case SyntaxKind.EnumDeclaration: - if (result = getSymbol(getSymbolOfNode(location).exports, name, meaning & SymbolFlags.EnumMember)) { + if (result = lookup(getSymbolOfNode(location).exports, name, meaning & SymbolFlags.EnumMember)) { break loop; } break; @@ -950,7 +972,7 @@ namespace ts { if (isClassLike(location.parent) && !(getModifierFlags(location) & ModifierFlags.Static)) { const ctor = findConstructorDeclaration(location.parent); if (ctor && ctor.locals) { - if (getSymbol(ctor.locals, name, meaning & SymbolFlags.Value)) { + if (lookup(ctor.locals, name, meaning & SymbolFlags.Value)) { // Remember the property node, it will be used later to report appropriate error propertyWithInvalidInitializer = location; } @@ -960,7 +982,7 @@ namespace ts { case SyntaxKind.ClassDeclaration: case SyntaxKind.ClassExpression: case SyntaxKind.InterfaceDeclaration: - if (result = getSymbol(getSymbolOfNode(location).members, name, meaning & SymbolFlags.Type)) { + if (result = lookup(getSymbolOfNode(location).members, name, meaning & SymbolFlags.Type)) { if (!isTypeParameterSymbolDeclaredInContainer(result, location)) { // ignore type parameters not declared in this container result = undefined; @@ -996,7 +1018,7 @@ namespace ts { grandparent = location.parent.parent; if (isClassLike(grandparent) || grandparent.kind === SyntaxKind.InterfaceDeclaration) { // A reference to this grandparent's type parameters would be an error - if (result = getSymbol(getSymbolOfNode(grandparent).members, name, meaning & SymbolFlags.Type)) { + if (result = lookup(getSymbolOfNode(grandparent).members, name, meaning & SymbolFlags.Type)) { error(errorLocation, Diagnostics.A_computed_property_name_cannot_reference_a_type_parameter_from_its_containing_type); return undefined; } @@ -1060,7 +1082,7 @@ namespace ts { } if (!result) { - result = getSymbol(globals, name, meaning); + result = lookup(globals, name, meaning); } if (!result) { @@ -1071,7 +1093,17 @@ namespace ts { !checkAndReportErrorForUsingTypeAsNamespace(errorLocation, name, meaning) && !checkAndReportErrorForUsingTypeAsValue(errorLocation, name, meaning) && !checkAndReportErrorForUsingNamespaceModuleAsValue(errorLocation, name, meaning)) { - error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + let suggestion: string | undefined; + if (suggestedNameNotFoundMessage && suggestionCount < maximumSuggestionCount) { + suggestion = getSuggestionForNonexistentSymbol(originalLocation, name, meaning); + if (suggestion) { + suggestionCount++; + error(errorLocation, suggestedNameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg), suggestion); + } + } + if (!suggestion) { + error(errorLocation, nameNotFoundMessage, typeof nameArg === "string" ? nameArg : declarationNameToString(nameArg)); + } } } return undefined; @@ -1205,6 +1237,10 @@ namespace ts { function checkAndReportErrorForUsingTypeAsValue(errorLocation: Node, name: string, meaning: SymbolFlags): boolean { if (meaning & (SymbolFlags.Value & ~SymbolFlags.NamespaceModule)) { + if (name === "any" || name === "string" || name === "number" || name === "boolean" || name === "never") { + error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name); + return true; + } const symbol = resolveSymbol(resolveName(errorLocation, name, SymbolFlags.Type & ~SymbolFlags.Value, /*nameNotFoundMessage*/undefined, /*nameArg*/ undefined)); if (symbol && !(symbol.flags & SymbolFlags.NamespaceModule)) { error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, name); @@ -10402,7 +10438,7 @@ namespace ts { function getResolvedSymbol(node: Identifier): Symbol { const links = getNodeLinks(node); if (!links.resolvedSymbol) { - links.resolvedSymbol = !nodeIsMissing(node) && resolveName(node, node.text, SymbolFlags.Value | SymbolFlags.ExportValue, Diagnostics.Cannot_find_name_0, node) || unknownSymbol; + links.resolvedSymbol = !nodeIsMissing(node) && resolveName(node, node.text, SymbolFlags.Value | SymbolFlags.ExportValue, Diagnostics.Cannot_find_name_0, node, Diagnostics.Cannot_find_name_0_Did_you_mean_1) || unknownSymbol; } return links.resolvedSymbol; } @@ -14118,44 +14154,6 @@ namespace ts { return checkPropertyAccessExpressionOrQualifiedName(node, node.left, node.right); } - function reportNonexistentProperty(propNode: Identifier, containingType: Type) { - let errorInfo: DiagnosticMessageChain; - if (containingType.flags & TypeFlags.Union && !(containingType.flags & TypeFlags.Primitive)) { - for (const subtype of (containingType as UnionType).types) { - if (!getPropertyOfType(subtype, propNode.text)) { - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); - break; - } - } - } - errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType)); - diagnostics.add(createDiagnosticForNodeFromMessageChain(propNode, errorInfo)); - } - - function markPropertyAsReferenced(prop: Symbol) { - if (prop && - noUnusedIdentifiers && - (prop.flags & SymbolFlags.ClassMember) && - prop.valueDeclaration && (getModifierFlags(prop.valueDeclaration) & ModifierFlags.Private)) { - if (getCheckFlags(prop) & CheckFlags.Instantiated) { - getSymbolLinks(prop).target.isReferenced = true; - } - else { - prop.isReferenced = true; - } - } - } - - function isInPropertyInitializer(node: Node): boolean { - while (node) { - if (node.parent && node.parent.kind === SyntaxKind.PropertyDeclaration && (node.parent as PropertyDeclaration).initializer === node) { - return true; - } - node = node.parent; - } - return false; - } - function checkPropertyAccessExpressionOrQualifiedName(node: PropertyAccessExpression | QualifiedName, left: Expression | QualifiedName, right: Identifier) { const type = checkNonNullExpression(left); if (isTypeAny(type) || type === silentNeverType) { @@ -14219,6 +14217,130 @@ namespace ts { return assignmentKind ? getBaseTypeOfLiteralType(flowType) : flowType; } + function reportNonexistentProperty(propNode: Identifier, containingType: Type) { + let errorInfo: DiagnosticMessageChain; + if (containingType.flags & TypeFlags.Union && !(containingType.flags & TypeFlags.Primitive)) { + for (const subtype of (containingType as UnionType).types) { + if (!getPropertyOfType(subtype, propNode.text)) { + errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(subtype)); + break; + } + } + } + const suggestion = getSuggestionForNonexistentProperty(propNode, containingType); + if (suggestion) { + errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2, declarationNameToString(propNode), typeToString(containingType), suggestion); + } + else { + errorInfo = chainDiagnosticMessages(errorInfo, Diagnostics.Property_0_does_not_exist_on_type_1, declarationNameToString(propNode), typeToString(containingType)); + } + diagnostics.add(createDiagnosticForNodeFromMessageChain(propNode, errorInfo)); + } + + function getSuggestionForNonexistentProperty(node: Identifier, containingType: Type): string | undefined { + const suggestion = getSpellingSuggestionForName(node.text, getPropertiesOfObjectType(containingType), SymbolFlags.Value); + return suggestion && suggestion.name; + } + + function getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string { + const result = resolveNameHelper(location, name, meaning, /*nameNotFoundMessage*/ undefined, name, (symbols, name, meaning) => { + const symbol = getSymbol(symbols, name, meaning); + if (symbol) { + // Sometimes the symbol is found when location is a return type of a function: `typeof x` and `x` is declared in the body of the function + // So the table *contains* `x` but `x` isn't actually in scope. + // However, resolveNameHelper will continue and call this callback again, so we'll eventually get a correct suggestion. + return symbol; + } + return getSpellingSuggestionForName(name, arrayFrom(symbols.values()), meaning); + }); + if (result) { + return result.name; + } + } + + /** + * Given a name and a list of symbols whose names are *not* equal to the name, return a spelling suggestion if there is one that is close enough. + * Names less than length 3 only check for case-insensitive equality, not levenshtein distance. + * + * If there is a candidate that's the same except for case, return that. + * If there is a candidate that's within one edit of the name, return that. + * Otherwise, return the candidate with the smallest Levenshtein distance, + * except for candidates: + * * With no name + * * Whose meaning doesn't match the `meaning` parameter. + * * Whose length differs from the target name by more than 0.3 of the length of the name. + * * Whose levenshtein distance is more than 0.4 of the length of the name + * (0.4 allows 1 substitution/transposition for every 5 characters, + * and 1 insertion/deletion at 3 characters) + * Names longer than 30 characters don't get suggestions because Levenshtein distance is an n**2 algorithm. + */ + function getSpellingSuggestionForName(name: string, symbols: Symbol[], meaning: SymbolFlags): Symbol | undefined { + const worstDistance = name.length * 0.4; + const maximumLengthDifference = Math.min(3, name.length * 0.34); + let bestDistance = Number.MAX_VALUE; + let bestCandidate = undefined; + if (name.length > 30) { + return undefined; + } + name = name.toLowerCase(); + for (const candidate of symbols) { + if (candidate.flags & meaning && + candidate.name && + Math.abs(candidate.name.length - name.length) < maximumLengthDifference) { + const candidateName = candidate.name.toLowerCase(); + if (candidateName === name) { + return candidate; + } + if (candidateName.length < 3 || + name.length < 3 || + candidateName === "eval" || + candidateName === "intl" || + candidateName === "undefined" || + candidateName === "map" || + candidateName === "nan" || + candidateName === "set") { + continue; + } + const distance = levenshtein(name, candidateName); + if (distance > worstDistance) { + continue; + } + if (distance < 3) { + return candidate; + } + else if (distance < bestDistance) { + bestDistance = distance; + bestCandidate = candidate; + } + } + } + return bestCandidate; + } + + function markPropertyAsReferenced(prop: Symbol) { + if (prop && + noUnusedIdentifiers && + (prop.flags & SymbolFlags.ClassMember) && + prop.valueDeclaration && (getModifierFlags(prop.valueDeclaration) & ModifierFlags.Private)) { + if (getCheckFlags(prop) & CheckFlags.Instantiated) { + getSymbolLinks(prop).target.isReferenced = true; + } + else { + prop.isReferenced = true; + } + } + } + + function isInPropertyInitializer(node: Node): boolean { + while (node) { + if (node.parent && node.parent.kind === SyntaxKind.PropertyDeclaration && (node.parent as PropertyDeclaration).initializer === node) { + return true; + } + node = node.parent; + } + return false; + } + function isValidPropertyAccess(node: PropertyAccessExpression | QualifiedName, propertyName: string): boolean { const left = node.kind === SyntaxKind.PropertyAccessExpression ? (node).expression diff --git a/src/compiler/diagnosticMessages.json b/src/compiler/diagnosticMessages.json index 4d2997ba3a820..c520290acbd84 100644 --- a/src/compiler/diagnosticMessages.json +++ b/src/compiler/diagnosticMessages.json @@ -1843,6 +1843,14 @@ "category": "Error", "code": 2550 }, + "Property '{0}' does not exist on type '{1}'. Did you mean '{2}'?": { + "category": "Error", + "code": 2551 + }, + "Cannot find name '{0}'. Did you mean '{1}'?": { + "category": "Error", + "code": 2552 + }, "JSX element attributes type '{0}' may not be a union type.": { "category": "Error", "code": 2600 @@ -3539,7 +3547,10 @@ "category": "Message", "code": 90021 }, - + "Change spelling to '{0}'.": { + "category": "Message", + "code": 90022 + }, "Octal literal types must use ES2015 syntax. Use the syntax '{0}'.": { "category": "Error", diff --git a/src/compiler/types.ts b/src/compiler/types.ts index 4f1772ca551a0..bbbce158caa0d 100644 --- a/src/compiler/types.ts +++ b/src/compiler/types.ts @@ -2552,6 +2552,8 @@ namespace ts { tryGetMemberInModuleExports(memberName: string, moduleSymbol: Symbol): Symbol | undefined; getApparentType(type: Type): Type; + getSuggestionForNonexistentProperty(node: Identifier, containingType: Type): string | undefined; + getSuggestionForNonexistentSymbol(location: Node, name: string, meaning: SymbolFlags): string; /* @internal */ getBaseConstraintOfType(type: Type): Type; /* @internal */ tryFindAmbientModuleWithoutAugmentations(moduleName: string): Symbol; diff --git a/src/compiler/utilities.ts b/src/compiler/utilities.ts index 44f5e3fe7902e..a859fde9cc1ec 100644 --- a/src/compiler/utilities.ts +++ b/src/compiler/utilities.ts @@ -4641,4 +4641,27 @@ namespace ts { export function unescapeIdentifier(identifier: string): string { return identifier.length >= 3 && identifier.charCodeAt(0) === CharacterCodes._ && identifier.charCodeAt(1) === CharacterCodes._ && identifier.charCodeAt(2) === CharacterCodes._ ? identifier.substr(1) : identifier; } + + export function levenshtein(s1: string, s2: string): number { + let previous: number[] = new Array(s2.length + 1); + let current: number[] = new Array(s2.length + 1); + for (let i = 0; i < s2.length + 1; i++) { + previous[i] = i; + current[i] = -1; + } + for (let i = 1; i < s1.length + 1; i++) { + current[0] = i; + for (let j = 1; j < s2.length + 1; j++) { + current[j] = Math.min( + previous[j] + 1, + current[j - 1] + 1, + previous[j - 1] + (s1[i - 1] === s2[j - 1] ? 0 : 2)); + } + // shift current back to previous, and then reuse previous' array + const tmp = previous; + previous = current; + current = tmp; + } + return previous[previous.length - 1]; + } } diff --git a/src/services/codefixes/fixAddMissingMember.ts b/src/services/codefixes/fixAddMissingMember.ts index 5bb24d397d90f..346cdaaaf1919 100644 --- a/src/services/codefixes/fixAddMissingMember.ts +++ b/src/services/codefixes/fixAddMissingMember.ts @@ -1,7 +1,8 @@ /* @internal */ namespace ts.codefix { registerCodeFix({ - errorCodes: [Diagnostics.Property_0_does_not_exist_on_type_1.code], + errorCodes: [Diagnostics.Property_0_does_not_exist_on_type_1.code, + Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code], getCodeActions: getActionsForAddMissingMember }); @@ -135,4 +136,4 @@ namespace ts.codefix { return actions; } } -} \ No newline at end of file +} diff --git a/src/services/codefixes/fixSpelling.ts b/src/services/codefixes/fixSpelling.ts new file mode 100644 index 0000000000000..b58dab9500211 --- /dev/null +++ b/src/services/codefixes/fixSpelling.ts @@ -0,0 +1,53 @@ +/* @internal */ +namespace ts.codefix { + registerCodeFix({ + errorCodes: [Diagnostics.Property_0_does_not_exist_on_type_1_Did_you_mean_2.code, + Diagnostics.Cannot_find_name_0_Did_you_mean_1.code], + getCodeActions: getActionsForCorrectSpelling + }); + + function getActionsForCorrectSpelling(context: CodeFixContext): CodeAction[] | undefined { + const sourceFile = context.sourceFile; + + // This is the identifier of the misspelled word. eg: + // this.speling = 1; + // ^^^^^^^ + const node = getTokenAtPosition(sourceFile, context.span.start); + const checker = context.program.getTypeChecker(); + let suggestion: string; + if (node.kind === SyntaxKind.Identifier && isPropertyAccessExpression(node.parent)) { + const containingType = checker.getTypeAtLocation(node.parent.expression); + suggestion = checker.getSuggestionForNonexistentProperty(node as Identifier, containingType); + } + else { + const meaning = getMeaningFromLocation(node); + suggestion = checker.getSuggestionForNonexistentSymbol(node, getTextOfNode(node), convertSemanticMeaningToSymbolFlags(meaning)); + } + if (suggestion) { + return [{ + description: formatStringFromArgs(getLocaleSpecificMessage(Diagnostics.Change_spelling_to_0), [suggestion]), + changes: [{ + fileName: sourceFile.fileName, + textChanges: [{ + span: { start: node.getStart(), length: node.getWidth() }, + newText: suggestion + }], + }], + }]; + } + } + + function convertSemanticMeaningToSymbolFlags(meaning: SemanticMeaning): SymbolFlags { + let flags = 0; + if (meaning & SemanticMeaning.Namespace) { + flags |= SymbolFlags.Namespace; + } + if (meaning & SemanticMeaning.Type) { + flags |= SymbolFlags.Type; + } + if (meaning & SemanticMeaning.Value) { + flags |= SymbolFlags.Value; + } + return flags; + } +} diff --git a/src/services/codefixes/fixes.ts b/src/services/codefixes/fixes.ts index ae1643dfa3baa..c2e2509a28e5b 100644 --- a/src/services/codefixes/fixes.ts +++ b/src/services/codefixes/fixes.ts @@ -1,5 +1,6 @@ /// /// +/// /// /// /// diff --git a/src/services/codefixes/importFixes.ts b/src/services/codefixes/importFixes.ts index 9322f09cb86a6..aaf7b535add42 100644 --- a/src/services/codefixes/importFixes.ts +++ b/src/services/codefixes/importFixes.ts @@ -3,6 +3,7 @@ namespace ts.codefix { registerCodeFix({ errorCodes: [ Diagnostics.Cannot_find_name_0.code, + Diagnostics.Cannot_find_name_0_Did_you_mean_1.code, Diagnostics.Cannot_find_namespace_0.code, Diagnostics._0_refers_to_a_UMD_global_but_the_current_file_is_a_module_Consider_adding_an_import_instead.code ], diff --git a/src/services/tsconfig.json b/src/services/tsconfig.json index 978195a31f64e..fd7269d46ddd3 100644 --- a/src/services/tsconfig.json +++ b/src/services/tsconfig.json @@ -82,6 +82,7 @@ "formatting/tokenRange.ts", "codeFixProvider.ts", "codefixes/fixAddMissingMember.ts", + "codefixes/fixSpelling.ts", "codefixes/fixExtendsInterfaceBecomesImplements.ts", "codefixes/fixClassIncorrectlyImplementsInterface.ts", "codefixes/fixClassDoesntImplementInheritedAbstractMember.ts", @@ -94,4 +95,4 @@ "codefixes/unusedIdentifierFixes.ts", "codefixes/disableJsDiagnostics.ts" ] -} \ No newline at end of file +} diff --git a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt index 96528577cbc41..96864565d85e9 100644 --- a/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt +++ b/tests/baselines/reference/ModuleWithExportedAndNonExportedFunctions.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(28,13): error TS2339: Property 'fn2' does not exist on type 'typeof A'. -tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(29,14): error TS2339: Property 'fng2' does not exist on type 'typeof A'. +tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts(29,14): error TS2551: Property 'fng2' does not exist on type 'typeof A'. Did you mean 'fng'? ==== tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAndNonExportedFunctions.ts (2 errors) ==== @@ -35,4 +35,4 @@ tests/cases/conformance/internalModules/exportDeclarations/ModuleWithExportedAnd !!! error TS2339: Property 'fn2' does not exist on type 'typeof A'. var fng2 = A.fng2; ~~~~ -!!! error TS2339: Property 'fng2' does not exist on type 'typeof A'. \ No newline at end of file +!!! error TS2551: Property 'fng2' does not exist on type 'typeof A'. Did you mean 'fng'? \ No newline at end of file diff --git a/tests/baselines/reference/anonymousClassExpression2.errors.txt b/tests/baselines/reference/anonymousClassExpression2.errors.txt index c9b59ae9c4dfa..6bc858bc5426b 100644 --- a/tests/baselines/reference/anonymousClassExpression2.errors.txt +++ b/tests/baselines/reference/anonymousClassExpression2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/anonymousClassExpression2.ts(13,18): error TS2339: Property 'methodA' does not exist on type 'B'. +tests/cases/compiler/anonymousClassExpression2.ts(13,18): error TS2551: Property 'methodA' does not exist on type 'B'. Did you mean 'methodB'? ==== tests/cases/compiler/anonymousClassExpression2.ts (1 errors) ==== @@ -16,7 +16,7 @@ tests/cases/compiler/anonymousClassExpression2.ts(13,18): error TS2339: Property methodB() { this.methodA; // error ~~~~~~~ -!!! error TS2339: Property 'methodA' does not exist on type 'B'. +!!! error TS2551: Property 'methodA' does not exist on type 'B'. Did you mean 'methodB'? this.methodB; // ok } } diff --git a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt index 080aca5a7ac30..ff79716cab832 100644 --- a/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt +++ b/tests/baselines/reference/assignmentRestElementWithErrorSourceType.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,5): error TS2304: Cannot find name 'c'. -tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,10): error TS2304: Cannot find name 'tupel'. +tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,10): error TS2552: Cannot find name 'tupel'. Did you mean 'tuple'? ==== tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts (2 errors) ==== @@ -8,4 +8,4 @@ tests/cases/compiler/assignmentRestElementWithErrorSourceType.ts(2,10): error TS ~ !!! error TS2304: Cannot find name 'c'. ~~~~~ -!!! error TS2304: Cannot find name 'tupel'. \ No newline at end of file +!!! error TS2552: Cannot find name 'tupel'. Did you mean 'tuple'? \ No newline at end of file diff --git a/tests/baselines/reference/autoLift2.errors.txt b/tests/baselines/reference/autoLift2.errors.txt index 9af3d59420f92..63d1c2c3548b3 100644 --- a/tests/baselines/reference/autoLift2.errors.txt +++ b/tests/baselines/reference/autoLift2.errors.txt @@ -1,9 +1,9 @@ tests/cases/compiler/autoLift2.ts(5,14): error TS2339: Property 'foo' does not exist on type 'A'. tests/cases/compiler/autoLift2.ts(5,17): error TS1005: ';' expected. -tests/cases/compiler/autoLift2.ts(5,19): error TS2304: Cannot find name 'any'. +tests/cases/compiler/autoLift2.ts(5,19): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/autoLift2.ts(6,14): error TS2339: Property 'bar' does not exist on type 'A'. tests/cases/compiler/autoLift2.ts(6,17): error TS1005: ';' expected. -tests/cases/compiler/autoLift2.ts(6,19): error TS2304: Cannot find name 'any'. +tests/cases/compiler/autoLift2.ts(6,19): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/autoLift2.ts(12,11): error TS2339: Property 'foo' does not exist on type 'A'. tests/cases/compiler/autoLift2.ts(14,11): error TS2339: Property 'bar' does not exist on type 'A'. tests/cases/compiler/autoLift2.ts(16,33): error TS2339: Property 'foo' does not exist on type 'A'. @@ -21,14 +21,14 @@ tests/cases/compiler/autoLift2.ts(18,33): error TS2339: Property 'bar' does not ~ !!! error TS1005: ';' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. this.bar: any; ~~~ !!! error TS2339: Property 'bar' does not exist on type 'A'. ~ !!! error TS1005: ';' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. } diff --git a/tests/baselines/reference/badArrayIndex.errors.txt b/tests/baselines/reference/badArrayIndex.errors.txt index 4830ff1f69338..decfebeeac712 100644 --- a/tests/baselines/reference/badArrayIndex.errors.txt +++ b/tests/baselines/reference/badArrayIndex.errors.txt @@ -1,10 +1,10 @@ -tests/cases/compiler/badArrayIndex.ts(1,15): error TS2304: Cannot find name 'number'. +tests/cases/compiler/badArrayIndex.ts(1,15): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/compiler/badArrayIndex.ts(1,22): error TS1109: Expression expected. ==== tests/cases/compiler/badArrayIndex.ts (2 errors) ==== var results = number[]; ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~ !!! error TS1109: Expression expected. \ No newline at end of file diff --git a/tests/baselines/reference/baseCheck.errors.txt b/tests/baselines/reference/baseCheck.errors.txt index 1f267f5530158..1353d6e1a08ba 100644 --- a/tests/baselines/reference/baseCheck.errors.txt +++ b/tests/baselines/reference/baseCheck.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/baseCheck.ts(9,18): error TS2304: Cannot find name 'loc'. +tests/cases/compiler/baseCheck.ts(9,18): error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'? tests/cases/compiler/baseCheck.ts(17,53): error TS2346: Supplied parameters do not match any signature of call target. tests/cases/compiler/baseCheck.ts(17,59): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/baseCheck.ts(18,62): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. @@ -20,7 +20,7 @@ tests/cases/compiler/baseCheck.ts(26,9): error TS2304: Cannot find name 'x'. constructor(x: number) { super(0, loc); ~~~ -!!! error TS2304: Cannot find name 'loc'. +!!! error TS2552: Cannot find name 'loc'. Did you mean 'ELoc'? } m() { diff --git a/tests/baselines/reference/bases.errors.txt b/tests/baselines/reference/bases.errors.txt index a61d35f664e52..3069f977fe12c 100644 --- a/tests/baselines/reference/bases.errors.txt +++ b/tests/baselines/reference/bases.errors.txt @@ -1,13 +1,13 @@ tests/cases/compiler/bases.ts(7,14): error TS2339: Property 'y' does not exist on type 'B'. tests/cases/compiler/bases.ts(7,15): error TS1005: ';' expected. -tests/cases/compiler/bases.ts(7,17): error TS2304: Cannot find name 'any'. +tests/cases/compiler/bases.ts(7,17): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/bases.ts(11,7): error TS2420: Class 'C' incorrectly implements interface 'I'. Property 'x' is missing in type 'C'. tests/cases/compiler/bases.ts(12,5): error TS2377: Constructors for derived classes must contain a 'super' call. tests/cases/compiler/bases.ts(13,9): error TS17009: 'super' must be called before accessing 'this' in the constructor of a derived class. tests/cases/compiler/bases.ts(13,14): error TS2339: Property 'x' does not exist on type 'C'. tests/cases/compiler/bases.ts(13,15): error TS1005: ';' expected. -tests/cases/compiler/bases.ts(13,17): error TS2304: Cannot find name 'any'. +tests/cases/compiler/bases.ts(13,17): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/bases.ts(17,9): error TS2339: Property 'x' does not exist on type 'C'. tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist on type 'C'. @@ -25,7 +25,7 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o ~ !!! error TS1005: ';' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. } } @@ -44,7 +44,7 @@ tests/cases/compiler/bases.ts(18,9): error TS2339: Property 'y' does not exist o ~ !!! error TS1005: ';' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. } ~~~~~ !!! error TS2377: Constructors for derived classes must contain a 'super' call. diff --git a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt index 7be5a1f086cb6..dbd10d775d98e 100644 --- a/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt +++ b/tests/baselines/reference/cannotInvokeNewOnIndexExpression.errors.txt @@ -1,7 +1,7 @@ -tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts(1,23): error TS2304: Cannot find name 'any'. +tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts(1,23): error TS2693: 'any' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/cannotInvokeNewOnIndexExpression.ts (1 errors) ==== var test: any[] = new any[1]; ~~~ -!!! error TS2304: Cannot find name 'any'. \ No newline at end of file +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt index d12c557102c33..399b159f48234 100644 --- a/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt +++ b/tests/baselines/reference/checkJsxChildrenProperty4.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/jsx/file.tsx(24,28): error TS2339: Property 'NAme' does not exist on type 'IUser'. +tests/cases/conformance/jsx/file.tsx(24,28): error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? tests/cases/conformance/jsx/file.tsx(32,9): error TS2322: Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IntrinsicAttributes & IntrinsicClassAttributes & IFetchUserProps & { children?: ReactNode; }'. Type '{ children: ((user: IUser) => Element)[]; }' is not assignable to type 'IFetchUserProps'. Types of property 'children' are incompatible. @@ -32,7 +32,7 @@ tests/cases/conformance/jsx/file.tsx(32,9): error TS2322: Type '{ children: ((us { user => (

{ user.NAme }

~~~~ -!!! error TS2339: Property 'NAme' does not exist on type 'IUser'. +!!! error TS2551: Property 'NAme' does not exist on type 'IUser'. Did you mean 'Name'? ) }
); diff --git a/tests/baselines/reference/classExtendingPrimitive.errors.txt b/tests/baselines/reference/classExtendingPrimitive.errors.txt index 554e0fbecbc64..32a3e68cb3ef5 100644 --- a/tests/baselines/reference/classExtendingPrimitive.errors.txt +++ b/tests/baselines/reference/classExtendingPrimitive.errors.txt @@ -1,11 +1,11 @@ -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(3,17): error TS2304: Cannot find name 'number'. -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(4,18): error TS2304: Cannot find name 'string'. -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(5,18): error TS2304: Cannot find name 'boolean'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(3,17): error TS2693: 'number' only refers to a type, but is being used as a value here. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(4,18): error TS2693: 'string' only refers to a type, but is being used as a value here. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(5,18): error TS2693: 'boolean' only refers to a type, but is being used as a value here. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(6,18): error TS2304: Cannot find name 'Void'. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(7,19): error TS1109: Expression expected. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(8,18): error TS2304: Cannot find name 'Null'. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(10,18): error TS2507: Type 'undefined' is not a constructor function type. -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(11,18): error TS2304: Cannot find name 'Undefined'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(11,18): error TS2552: Cannot find name 'Undefined'. Did you mean 'undefined'? tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendingPrimitive.ts(14,18): error TS2507: Type 'typeof E' is not a constructor function type. @@ -14,13 +14,13 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla class C extends number { } ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. class C2 extends string { } ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. class C3 extends boolean { } ~~~~~~~ -!!! error TS2304: Cannot find name 'boolean'. +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. class C4 extends Void { } ~~~~ !!! error TS2304: Cannot find name 'Void'. @@ -36,7 +36,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla !!! error TS2507: Type 'undefined' is not a constructor function type. class C7 extends Undefined { } ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Undefined'. +!!! error TS2552: Cannot find name 'Undefined'. Did you mean 'undefined'? enum E { A } class C8 extends E { } diff --git a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt index e1c5137e3a918..b4e8aa7360ec0 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(4,17): error TS2689: Cannot extend an interface 'I'. Did you mean 'implements'? tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,18): error TS2507: Type '{ foo: any; }' is not a constructor function type. -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,25): error TS2304: Cannot find name 'string'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,25): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(6,31): error TS1005: ',' expected. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(8,18): error TS2507: Type '{ foo: string; }' is not a constructor function type. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType.ts(11,18): error TS2507: Type 'typeof M' is not a constructor function type. @@ -20,7 +20,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla ~~~~~~~~~~~~~~~~ !!! error TS2507: Type '{ foo: any; }' is not a constructor function type. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ',' expected. var x: { foo: string; } diff --git a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt index af52a248b5419..bbaac16658220 100644 --- a/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt +++ b/tests/baselines/reference/classExtendsEveryObjectType2.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,18): error TS2507: Type '{ foo: any; }' is not a constructor function type. -tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,25): error TS2304: Cannot find name 'string'. +tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,25): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(1,31): error TS1005: ',' expected. tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/classExtendsEveryObjectType2.ts(3,18): error TS2507: Type 'undefined[]' is not a constructor function type. @@ -9,7 +9,7 @@ tests/cases/conformance/classes/classDeclarations/classHeritageSpecification/cla ~~~~~~~~~~~~~~~~ !!! error TS2507: Type '{ foo: any; }' is not a constructor function type. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ',' expected. diff --git a/tests/baselines/reference/classMemberWithMissingIdentifier2.errors.txt b/tests/baselines/reference/classMemberWithMissingIdentifier2.errors.txt index b21e062e3b037..9854a115aa672 100644 --- a/tests/baselines/reference/classMemberWithMissingIdentifier2.errors.txt +++ b/tests/baselines/reference/classMemberWithMissingIdentifier2.errors.txt @@ -2,7 +2,7 @@ tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,11): error TS1146: D tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,12): error TS1005: '=' expected. tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,14): error TS2304: Cannot find name 'name'. tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,18): error TS1005: ']' expected. -tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,19): error TS2304: Cannot find name 'string'. +tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,19): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,25): error TS1005: ',' expected. tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,26): error TS1136: Property assignment expected. tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,27): error TS2304: Cannot find name 'VariableDeclaration'. @@ -20,7 +20,7 @@ tests/cases/compiler/classMemberWithMissingIdentifier2.ts(2,27): error TS2304: C ~ !!! error TS1005: ']' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/complicatedPrivacy.errors.txt b/tests/baselines/reference/complicatedPrivacy.errors.txt index c81605a5a835a..661b0693807c4 100644 --- a/tests/baselines/reference/complicatedPrivacy.errors.txt +++ b/tests/baselines/reference/complicatedPrivacy.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/complicatedPrivacy.ts(11,24): error TS1054: A 'get' accessor cannot have parameters. tests/cases/compiler/complicatedPrivacy.ts(35,5): error TS1170: A computed property name in a type literal must directly refer to a built-in symbol. -tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2304: Cannot find name 'number'. +tests/cases/compiler/complicatedPrivacy.ts(35,6): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo5' has no exported member 'i6'. @@ -45,7 +45,7 @@ tests/cases/compiler/complicatedPrivacy.ts(73,55): error TS2694: Namespace 'mglo ~~~~~~~~ !!! error TS1170: A computed property name in a type literal must directly refer to a built-in symbol. ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. }) { } diff --git a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt index a572e0b34c803..1d37b20a3b3e8 100644 --- a/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt +++ b/tests/baselines/reference/constructorWithIncompleteTypeAnnotation.errors.txt @@ -52,13 +52,13 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,9): error TS tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,16): error TS2304: Cannot find name 'method1'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,24): error TS2304: Cannot find name 'val'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,27): error TS1005: ',' expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2304: Cannot find name 'number'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,28): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(235,36): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,9): error TS1128: Declaration or statement expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,16): error TS2304: Cannot find name 'method2'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(238,26): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(241,5): error TS1128: Declaration or statement expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2339: Property 'method1' does not exist on type 'B'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(246,25): error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(254,9): error TS2390: Constructor implementation is missing. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(254,21): error TS2369: A parameter property is only allowed in a constructor implementation. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(254,44): error TS2369: A parameter property is only allowed in a constructor implementation. @@ -67,14 +67,14 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,9): error TS tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,16): error TS2304: Cannot find name 'Overloads'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,26): error TS2304: Cannot find name 'value'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,31): error TS1005: ',' expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2304: Cannot find name 'string'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(256,33): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,9): error TS1128: Declaration or statement expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,16): error TS2304: Cannot find name 'Overloads'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,27): error TS1135: Argument expression expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,33): error TS1005: '(' expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2304: Cannot find name 'string'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,35): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,43): error TS1109: Expression expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2304: Cannot find name 'string'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,52): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,60): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(257,65): error TS1109: Expression expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,9): error TS2304: Cannot find name 'public'. @@ -82,7 +82,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,16): error T tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,16): error TS2304: Cannot find name 'DefaultValue'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,29): error TS2304: Cannot find name 'value'. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,35): error TS1109: Expression expected. -tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2304: Cannot find name 'string'. +tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,37): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(259,55): error TS1005: ';' expected. tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS1128: Declaration or statement expected. @@ -435,7 +435,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ~ !!! error TS1005: ',' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. return val; @@ -458,7 +458,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS public method2() { return this.method1(2); ~~~~~~~ -!!! error TS2339: Property 'method1' does not exist on type 'B'. +!!! error TS2551: Property 'method1' does not exist on type 'B'. Did you mean 'method2'? } } @@ -486,7 +486,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ~ !!! error TS1005: ',' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. public Overloads( while : string, ...rest: string[]) { & ~~~~~~ !!! error TS1128: Declaration or statement expected. @@ -497,11 +497,11 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ~ !!! error TS1005: '(' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~~~ !!! error TS1109: Expression expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. ~ @@ -519,7 +519,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS ~ !!! error TS1109: Expression expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. } diff --git a/tests/baselines/reference/createArray.errors.txt b/tests/baselines/reference/createArray.errors.txt index 31f6b88003099..082e8dc03e289 100644 --- a/tests/baselines/reference/createArray.errors.txt +++ b/tests/baselines/reference/createArray.errors.txt @@ -1,16 +1,16 @@ -tests/cases/compiler/createArray.ts(1,12): error TS2304: Cannot find name 'number'. +tests/cases/compiler/createArray.ts(1,12): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/compiler/createArray.ts(1,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/createArray.ts(6,6): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/createArray.ts(7,12): error TS2304: Cannot find name 'boolean'. +tests/cases/compiler/createArray.ts(7,12): error TS2693: 'boolean' only refers to a type, but is being used as a value here. tests/cases/compiler/createArray.ts(7,19): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/createArray.ts(8,12): error TS2304: Cannot find name 'string'. +tests/cases/compiler/createArray.ts(8,12): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. ==== tests/cases/compiler/createArray.ts (7 errors) ==== var na=new number[]; ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. @@ -22,12 +22,12 @@ tests/cases/compiler/createArray.ts(8,18): error TS1150: 'new T[]' cannot be use !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var ba=new boolean[]; ~~~~~~~ -!!! error TS2304: Cannot find name 'boolean'. +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var sa=new string[]; ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. function f(s:string):number { return 0; diff --git a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt index 8db71591f4710..cdc7938d1af64 100644 --- a/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt +++ b/tests/baselines/reference/destructuringParameterDeclaration4.errors.txt @@ -3,7 +3,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(14,17): error TS1047: A rest parameter cannot be optional. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(15,16): error TS1048: A rest parameter cannot have an initializer. tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(20,19): error TS2345: Argument of type 'true' is not assignable to parameter of type 'string | number'. -tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(21,7): error TS2304: Cannot find name 'array2'. +tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(21,7): error TS2552: Cannot find name 'array2'. Did you mean 'Array'? tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts(22,4): error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. Types of property '2' are incompatible. Type 'string' is not assignable to type '[[any]]'. @@ -50,7 +50,7 @@ tests/cases/conformance/es6/destructuring/destructuringParameterDeclaration4.ts( !!! error TS2345: Argument of type 'true' is not assignable to parameter of type 'string | number'. a1(...array2); // Error parameter type is (number|string)[] ~~~~~~ -!!! error TS2304: Cannot find name 'array2'. +!!! error TS2552: Cannot find name 'array2'. Did you mean 'Array'? a5([1, 2, "string", false, true]); // Error, parameter type is [any, any, [[any]]] ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ !!! error TS2345: Argument of type '[number, number, string, boolean, boolean]' is not assignable to parameter of type '[any, any, [[any]]]'. diff --git a/tests/baselines/reference/dottedModuleName.errors.txt b/tests/baselines/reference/dottedModuleName.errors.txt index afb8b9443559d..a2fa71430f82f 100644 --- a/tests/baselines/reference/dottedModuleName.errors.txt +++ b/tests/baselines/reference/dottedModuleName.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/dottedModuleName.ts(3,29): error TS1144: '{' or ';' expected. -tests/cases/compiler/dottedModuleName.ts(3,33): error TS2304: Cannot find name 'x'. +tests/cases/compiler/dottedModuleName.ts(3,33): error TS2552: Cannot find name 'x'. Did you mean 'X'? ==== tests/cases/compiler/dottedModuleName.ts (2 errors) ==== @@ -9,7 +9,7 @@ tests/cases/compiler/dottedModuleName.ts(3,33): error TS2304: Cannot find name ' ~~ !!! error TS1144: '{' or ';' expected. ~ -!!! error TS2304: Cannot find name 'x'. +!!! error TS2552: Cannot find name 'x'. Did you mean 'X'? export module X.Y.Z { export var v2=f(v); } diff --git a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt index f385d0afcb3b4..6ed1517335d24 100644 --- a/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt +++ b/tests/baselines/reference/errorLocationForInterfaceExtension.errors.txt @@ -1,4 +1,4 @@ -tests/cases/compiler/errorLocationForInterfaceExtension.ts(3,21): error TS2304: Cannot find name 'string'. +tests/cases/compiler/errorLocationForInterfaceExtension.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/errorLocationForInterfaceExtension.ts (1 errors) ==== @@ -6,5 +6,5 @@ tests/cases/compiler/errorLocationForInterfaceExtension.ts(3,21): error TS2304: interface x extends string { } ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt index bf9006a7143a1..7dffc9053e3cb 100644 --- a/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt +++ b/tests/baselines/reference/errorMessageOnObjectLiteralType.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/errorMessageOnObjectLiteralType.ts(5,3): error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. -tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'. +tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2551: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'. Did you mean 'getOwnPropertyNames'? ==== tests/cases/compiler/errorMessageOnObjectLiteralType.ts (2 errors) ==== @@ -12,4 +12,4 @@ tests/cases/compiler/errorMessageOnObjectLiteralType.ts(6,8): error TS2339: Prop !!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type '{ a: string; b: number; }'. Object.getOwnPropertyNamess(null); ~~~~~~~~~~~~~~~~~~~~ -!!! error TS2339: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'. \ No newline at end of file +!!! error TS2551: Property 'getOwnPropertyNamess' does not exist on type 'ObjectConstructor'. Did you mean 'getOwnPropertyNames'? \ No newline at end of file diff --git a/tests/baselines/reference/externModule.errors.txt b/tests/baselines/reference/externModule.errors.txt index 8d4126350c197..d6659c1d548ca 100644 --- a/tests/baselines/reference/externModule.errors.txt +++ b/tests/baselines/reference/externModule.errors.txt @@ -8,10 +8,10 @@ tests/cases/compiler/externModule.ts(18,6): error TS2390: Constructor implementa tests/cases/compiler/externModule.ts(20,13): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/externModule.ts(26,13): error TS2391: Function implementation is missing or not immediately following the declaration. tests/cases/compiler/externModule.ts(28,13): error TS2391: Function implementation is missing or not immediately following the declaration. -tests/cases/compiler/externModule.ts(32,11): error TS2304: Cannot find name 'XDate'. -tests/cases/compiler/externModule.ts(34,7): error TS2304: Cannot find name 'XDate'. -tests/cases/compiler/externModule.ts(36,7): error TS2304: Cannot find name 'XDate'. -tests/cases/compiler/externModule.ts(37,3): error TS2304: Cannot find name 'XDate'. +tests/cases/compiler/externModule.ts(32,11): error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? +tests/cases/compiler/externModule.ts(34,7): error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? +tests/cases/compiler/externModule.ts(36,7): error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? +tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? ==== tests/cases/compiler/externModule.ts (14 errors) ==== @@ -68,17 +68,17 @@ tests/cases/compiler/externModule.ts(37,3): error TS2304: Cannot find name 'XDat var d=new XDate(); ~~~~~ -!!! error TS2304: Cannot find name 'XDate'. +!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? d.getDay(); d=new XDate(1978,2); ~~~~~ -!!! error TS2304: Cannot find name 'XDate'. +!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? d.getXDate(); var n=XDate.parse("3/2/2004"); ~~~~~ -!!! error TS2304: Cannot find name 'XDate'. +!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? n=XDate.UTC(1964,2,1); ~~~~~ -!!! error TS2304: Cannot find name 'XDate'. +!!! error TS2552: Cannot find name 'XDate'. Did you mean 'Date'? \ No newline at end of file diff --git a/tests/baselines/reference/letDeclarations-scopes2.errors.txt b/tests/baselines/reference/letDeclarations-scopes2.errors.txt index 8e0cf04aa1416..5da8d99d397c1 100644 --- a/tests/baselines/reference/letDeclarations-scopes2.errors.txt +++ b/tests/baselines/reference/letDeclarations-scopes2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/compiler/letDeclarations-scopes2.ts(8,5): error TS2304: Cannot find name 'local2'. -tests/cases/compiler/letDeclarations-scopes2.ts(20,5): error TS2304: Cannot find name 'local2'. +tests/cases/compiler/letDeclarations-scopes2.ts(8,5): error TS2552: Cannot find name 'local2'. Did you mean 'local'? +tests/cases/compiler/letDeclarations-scopes2.ts(20,5): error TS2552: Cannot find name 'local2'. Did you mean 'local'? tests/cases/compiler/letDeclarations-scopes2.ts(23,1): error TS2304: Cannot find name 'local'. tests/cases/compiler/letDeclarations-scopes2.ts(25,1): error TS2304: Cannot find name 'local2'. @@ -14,7 +14,7 @@ tests/cases/compiler/letDeclarations-scopes2.ts(25,1): error TS2304: Cannot find global; // OK local2; // Error ~~~~~~ -!!! error TS2304: Cannot find name 'local2'. +!!! error TS2552: Cannot find name 'local2'. Did you mean 'local'? { let local2 = 0; @@ -28,7 +28,7 @@ tests/cases/compiler/letDeclarations-scopes2.ts(25,1): error TS2304: Cannot find global; // OK local2; // Error ~~~~~~ -!!! error TS2304: Cannot find name 'local2'. +!!! error TS2552: Cannot find name 'local2'. Did you mean 'local'? } local; // Error diff --git a/tests/baselines/reference/maximum10SpellingSuggestions.errors.txt b/tests/baselines/reference/maximum10SpellingSuggestions.errors.txt new file mode 100644 index 0000000000000..8069d7bd1f5c7 --- /dev/null +++ b/tests/baselines/reference/maximum10SpellingSuggestions.errors.txt @@ -0,0 +1,45 @@ +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,1): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,6): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,11): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,16): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,21): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,26): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,31): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,36): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,41): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(4,46): error TS2552: Cannot find name 'bob'. Did you mean 'blob'? +tests/cases/compiler/maximum10SpellingSuggestions.ts(5,1): error TS2304: Cannot find name 'bob'. +tests/cases/compiler/maximum10SpellingSuggestions.ts(5,6): error TS2304: Cannot find name 'bob'. + + +==== tests/cases/compiler/maximum10SpellingSuggestions.ts (12 errors) ==== + // 10 bobs on the first line + // the last two bobs should not have did-you-mean spelling suggestions + var blob; + bob; bob; bob; bob; bob; bob; bob; bob; bob; bob; + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + ~~~ +!!! error TS2552: Cannot find name 'bob'. Did you mean 'blob'? + bob; bob; + ~~~ +!!! error TS2304: Cannot find name 'bob'. + ~~~ +!!! error TS2304: Cannot find name 'bob'. + \ No newline at end of file diff --git a/tests/baselines/reference/maximum10SpellingSuggestions.js b/tests/baselines/reference/maximum10SpellingSuggestions.js new file mode 100644 index 0000000000000..eedd55b084076 --- /dev/null +++ b/tests/baselines/reference/maximum10SpellingSuggestions.js @@ -0,0 +1,24 @@ +//// [maximum10SpellingSuggestions.ts] +// 10 bobs on the first line +// the last two bobs should not have did-you-mean spelling suggestions +var blob; +bob; bob; bob; bob; bob; bob; bob; bob; bob; bob; +bob; bob; + + +//// [maximum10SpellingSuggestions.js] +// 10 bobs on the first line +// the last two bobs should not have did-you-mean spelling suggestions +var blob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; +bob; diff --git a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt index 80b8e345cde31..b56b03de533f4 100644 --- a/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt +++ b/tests/baselines/reference/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(4,18): error TS2339: Property 'from' does not exist on type 'ArrayConstructor'. tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(10,13): error TS2304: Cannot find name 'Map'. tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(17,5): error TS2339: Property 'name' does not exist on type '() => void'. -tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2339: Property 'sign' does not exist on type 'Math'. +tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(20,6): error TS2551: Property 'sign' does not exist on type 'Math'. Did you mean 'sin'? tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2304: Cannot find name 'Symbol'. tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2304: Cannot find name 'Symbol'. tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'. @@ -40,7 +40,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t // Using ES6 math Math.sign(1); ~~~~ -!!! error TS2339: Property 'sign' does not exist on type 'Math'. +!!! error TS2551: Property 'sign' does not exist on type 'Math'. Did you mean 'sin'? // Using ES6 object var o = { diff --git a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt index e435b98050de6..248d4c3547370 100644 --- a/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt +++ b/tests/baselines/reference/narrowExceptionVariableInCatchClause.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(11,17): error TS2339: Property 'doPanic' does not exist on type '{ type: "foo"; dontPanic(): any; }'. -tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17): error TS2339: Property 'massage' does not exist on type 'Error'. +tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(11,17): error TS2551: Property 'doPanic' does not exist on type '{ type: "foo"; dontPanic(): any; }'. Did you mean 'dontPanic'? +tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17): error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? ==== tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts (2 errors) ==== @@ -15,14 +15,14 @@ tests/cases/conformance/types/any/narrowExceptionVariableInCatchClause.ts(16,17) err.dontPanic(); // OK err.doPanic(); // ERROR: Property 'doPanic' does not exist on type '{...}' ~~~~~~~ -!!! error TS2339: Property 'doPanic' does not exist on type '{ type: "foo"; dontPanic(): any; }'. +!!! error TS2551: Property 'doPanic' does not exist on type '{ type: "foo"; dontPanic(): any; }'. Did you mean 'dontPanic'? } else if (err instanceof Error) { err.message; err.massage; // ERROR: Property 'massage' does not exist on type 'Error' ~~~~~~~ -!!! error TS2339: Property 'massage' does not exist on type 'Error'. +!!! error TS2551: Property 'massage' does not exist on type 'Error'. Did you mean 'message'? } else { diff --git a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt index 3e152b0faf456..f846565190138 100644 --- a/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithInstanceof.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(17,7): error TS2339: Property 'mesage' does not exist on type 'Error'. -tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS2339: Property 'getHuors' does not exist on type 'Date'. +tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(17,7): error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? +tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? ==== tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts (2 errors) ==== @@ -21,13 +21,13 @@ tests/cases/conformance/types/any/narrowFromAnyWithInstanceof.ts(22,7): error TS x.message; x.mesage; ~~~~~~ -!!! error TS2339: Property 'mesage' does not exist on type 'Error'. +!!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? } if (x instanceof Date) { x.getDate(); x.getHuors(); ~~~~~~~~ -!!! error TS2339: Property 'getHuors' does not exist on type 'Date'. +!!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? } \ No newline at end of file diff --git a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt index c06c8a9880122..4865748f3325c 100644 --- a/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt +++ b/tests/baselines/reference/narrowFromAnyWithTypePredicate.errors.txt @@ -1,7 +1,7 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(22,7): error TS2339: Property 'method' does not exist on type '{}'. tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(23,5): error TS2349: Cannot invoke an expression whose type lacks a call signature. Type '{}' has no compatible call signatures. -tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(28,7): error TS2339: Property 'mesage' does not exist on type 'Error'. -tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error TS2339: Property 'getHuors' does not exist on type 'Date'. +tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(28,7): error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? +tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? ==== tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts (4 errors) ==== @@ -38,13 +38,13 @@ tests/cases/conformance/types/any/narrowFromAnyWithTypePredicate.ts(33,7): error x.message; x.mesage; ~~~~~~ -!!! error TS2339: Property 'mesage' does not exist on type 'Error'. +!!! error TS2551: Property 'mesage' does not exist on type 'Error'. Did you mean 'message'? } if (isDate(x)) { x.getDate(); x.getHuors(); ~~~~~~~~ -!!! error TS2339: Property 'getHuors' does not exist on type 'Date'. +!!! error TS2551: Property 'getHuors' does not exist on type 'Date'. Did you mean 'getHours'? } \ No newline at end of file diff --git a/tests/baselines/reference/newExpressionWithCast.errors.txt b/tests/baselines/reference/newExpressionWithCast.errors.txt index 4fc4ee24d8c8b..5a2e18c585ffa 100644 --- a/tests/baselines/reference/newExpressionWithCast.errors.txt +++ b/tests/baselines/reference/newExpressionWithCast.errors.txt @@ -1,7 +1,7 @@ tests/cases/compiler/newExpressionWithCast.ts(3,12): error TS7009: 'new' expression, whose target lacks a construct signature, implicitly has an 'any' type. tests/cases/compiler/newExpressionWithCast.ts(7,13): error TS2365: Operator '>' cannot be applied to types 'boolean' and 'void'. tests/cases/compiler/newExpressionWithCast.ts(7,17): error TS1109: Expression expected. -tests/cases/compiler/newExpressionWithCast.ts(7,18): error TS2304: Cannot find name 'any'. +tests/cases/compiler/newExpressionWithCast.ts(7,18): error TS2693: 'any' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/newExpressionWithCast.ts (4 errors) ==== @@ -19,7 +19,7 @@ tests/cases/compiler/newExpressionWithCast.ts(7,18): error TS2304: Cannot find n ~ !!! error TS1109: Expression expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. function Test3() { } // valid with noImplicitAny diff --git a/tests/baselines/reference/newNonReferenceType.errors.txt b/tests/baselines/reference/newNonReferenceType.errors.txt index a68eba9b9e702..01824a64f5f48 100644 --- a/tests/baselines/reference/newNonReferenceType.errors.txt +++ b/tests/baselines/reference/newNonReferenceType.errors.txt @@ -1,12 +1,12 @@ -tests/cases/compiler/newNonReferenceType.ts(1,13): error TS2304: Cannot find name 'any'. -tests/cases/compiler/newNonReferenceType.ts(2,13): error TS2304: Cannot find name 'boolean'. +tests/cases/compiler/newNonReferenceType.ts(1,13): error TS2693: 'any' only refers to a type, but is being used as a value here. +tests/cases/compiler/newNonReferenceType.ts(2,13): error TS2693: 'boolean' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/newNonReferenceType.ts (2 errors) ==== var a = new any(); ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. var b = new boolean(); // error ~~~~~~~ -!!! error TS2304: Cannot find name 'boolean'. +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/baselines/reference/newOperator.errors.txt b/tests/baselines/reference/newOperator.errors.txt index fc6f22d9eacb4..ae96023a60b76 100644 --- a/tests/baselines/reference/newOperator.errors.txt +++ b/tests/baselines/reference/newOperator.errors.txt @@ -1,10 +1,10 @@ tests/cases/compiler/newOperator.ts(3,13): error TS2693: 'ifc' only refers to a type, but is being used as a value here. tests/cases/compiler/newOperator.ts(10,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. tests/cases/compiler/newOperator.ts(11,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. -tests/cases/compiler/newOperator.ts(12,5): error TS2304: Cannot find name 'string'. -tests/cases/compiler/newOperator.ts(18,14): error TS2304: Cannot find name 'string'. +tests/cases/compiler/newOperator.ts(12,5): error TS2693: 'string' only refers to a type, but is being used as a value here. +tests/cases/compiler/newOperator.ts(18,14): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/newOperator.ts(18,20): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/compiler/newOperator.ts(21,1): error TS2304: Cannot find name 'string'. +tests/cases/compiler/newOperator.ts(21,1): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/newOperator.ts(22,1): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/compiler/newOperator.ts(28,13): error TS2304: Cannot find name 'q'. tests/cases/compiler/newOperator.ts(31,10): error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. @@ -32,7 +32,7 @@ tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be us !!! error TS2351: Cannot use 'new' with an expression whose type lacks a call or construct signature. new string; ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. // Use in LHS of expression? (new Date()).toString(); @@ -40,14 +40,14 @@ tests/cases/compiler/newOperator.ts(45,23): error TS1150: 'new T[]' cannot be us // Various spacing var t3 = new string[]( ); ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. var t4 = new string ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. [ ~ ] diff --git a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt index ae16b59b095fc..cded9c44a3db3 100644 --- a/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt +++ b/tests/baselines/reference/overloadingStaticFunctionsInFunctions.errors.txt @@ -5,12 +5,12 @@ tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128 tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,10): error TS2304: Cannot find name 'test'. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,15): error TS2304: Cannot find name 'name'. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,19): error TS1005: ',' expected. -tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,20): error TS2304: Cannot find name 'string'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,20): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,3): error TS1128: Declaration or statement expected. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,10): error TS2304: Cannot find name 'test'. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,15): error TS2304: Cannot find name 'name'. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,20): error TS1109: Expression expected. -tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,21): error TS2304: Cannot find name 'any'. +tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,21): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS1005: ';' expected. @@ -33,7 +33,7 @@ tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS100 ~ !!! error TS1005: ',' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. static test(name?:any){ } ~~~~~~ !!! error TS1128: Declaration or statement expected. @@ -44,7 +44,7 @@ tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS100 ~ !!! error TS1109: Expression expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. } \ No newline at end of file diff --git a/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt b/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt index 54ddb963f94d0..c4e29ca62f9d6 100644 --- a/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt +++ b/tests/baselines/reference/parameterNamesInTypeParameterList.errors.txt @@ -1,44 +1,44 @@ -tests/cases/compiler/parameterNamesInTypeParameterList.ts(1,30): error TS2304: Cannot find name 'a'. -tests/cases/compiler/parameterNamesInTypeParameterList.ts(5,30): error TS2304: Cannot find name 'a'. -tests/cases/compiler/parameterNamesInTypeParameterList.ts(9,30): error TS2304: Cannot find name 'a'. -tests/cases/compiler/parameterNamesInTypeParameterList.ts(14,22): error TS2304: Cannot find name 'a'. -tests/cases/compiler/parameterNamesInTypeParameterList.ts(17,22): error TS2304: Cannot find name 'a'. -tests/cases/compiler/parameterNamesInTypeParameterList.ts(20,22): error TS2304: Cannot find name 'a'. +tests/cases/compiler/parameterNamesInTypeParameterList.ts(1,30): error TS2552: Cannot find name 'a'. Did you mean 'A'? +tests/cases/compiler/parameterNamesInTypeParameterList.ts(5,30): error TS2552: Cannot find name 'a'. Did you mean 'A'? +tests/cases/compiler/parameterNamesInTypeParameterList.ts(9,30): error TS2552: Cannot find name 'a'. Did you mean 'A'? +tests/cases/compiler/parameterNamesInTypeParameterList.ts(14,22): error TS2552: Cannot find name 'a'. Did you mean 'A'? +tests/cases/compiler/parameterNamesInTypeParameterList.ts(17,22): error TS2552: Cannot find name 'a'. Did you mean 'A'? +tests/cases/compiler/parameterNamesInTypeParameterList.ts(20,22): error TS2552: Cannot find name 'a'. Did you mean 'A'? ==== tests/cases/compiler/parameterNamesInTypeParameterList.ts (6 errors) ==== function f0(a: T) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b; } function f1({a}: {a:T}) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b; } function f2([a]: T[]) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b; } class A { m0(a: T) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b } m1({a}: {a:T}) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b } m2([a]: T[]) { ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? a.b } } \ No newline at end of file diff --git a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt index 6af3f2843f60a..6c2a0562a7c67 100644 --- a/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt +++ b/tests/baselines/reference/parserMemberAccessAfterPostfixExpression1.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts(1,1): error TS2304: Cannot find name 'a'. tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts(1,4): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts(1,5): error TS2304: Cannot find name 'toString'. +tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts(1,5): error TS2552: Cannot find name 'toString'. Did you mean 'String'? ==== tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPostfixExpression1.ts (3 errors) ==== @@ -10,4 +10,4 @@ tests/cases/conformance/parser/ecmascript5/Expressions/parserMemberAccessAfterPo ~ !!! error TS1005: ';' expected. ~~~~~~~~ -!!! error TS2304: Cannot find name 'toString'. \ No newline at end of file +!!! error TS2552: Cannot find name 'toString'. Did you mean 'String'? \ No newline at end of file diff --git a/tests/baselines/reference/parserRealSource10.errors.txt b/tests/baselines/reference/parserRealSource10.errors.txt index ae48cd79b5188..7d65c1690fe57 100644 --- a/tests/baselines/reference/parserRealSource10.errors.txt +++ b/tests/baselines/reference/parserRealSource10.errors.txt @@ -1,11 +1,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(127,33): error TS2449: Class 'TokenInfo' used before its declaration. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(127,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,36): error TS2304: Cannot find name 'string'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,36): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(128,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,41): error TS2304: Cannot find name 'number'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,41): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(129,47): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,35): error TS2304: Cannot find name 'boolean'. +tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,35): error TS2693: 'boolean' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(130,42): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(179,54): error TS2304: Cannot find name 'ErrorRecoverySet'. tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(184,28): error TS2304: Cannot find name 'ErrorRecoverySet'. @@ -479,17 +479,17 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource10.ts(449,40): error !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. export var nodeTypeTable = new string[]; ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. export var nodeTypeToTokTable = new number[]; ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. export var noRegexTable = new boolean[]; ~~~~~~~ -!!! error TS2304: Cannot find name 'boolean'. +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. diff --git a/tests/baselines/reference/parserRealSource11.errors.txt b/tests/baselines/reference/parserRealSource11.errors.txt index efae0f962fd1d..ba52fa5b62d2b 100644 --- a/tests/baselines/reference/parserRealSource11.errors.txt +++ b/tests/baselines/reference/parserRealSource11.errors.txt @@ -46,7 +46,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(199,42): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(219,33): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(231,48): error TS2304: Cannot find name 'TokenID'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(233,52): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(233,52): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(237,36): error TS2304: Cannot find name 'TypeFlow'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(251,21): error TS2304: Cannot find name 'Symbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(268,19): error TS2304: Cannot find name 'NodeType'. @@ -85,27 +85,27 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(427,22): error tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(441,30): error TS2304: Cannot find name 'Emitter'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(441,48): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(445,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(446,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(446,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(449,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(451,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(451,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(453,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(454,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(454,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(457,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(460,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(463,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(465,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(465,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(467,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(469,50): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(472,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(472,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(474,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(476,50): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(479,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(479,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(481,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(483,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(483,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(485,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(487,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(487,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(489,22): error TS2304: Cannot find name 'NodeType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(491,58): error TS2304: Cannot find name 'TokenID'. +tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(491,58): error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(494,22): error TS2304: Cannot find name 'NodeType'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(496,58): error TS2304: Cannot find name 'TokenID'. tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(498,22): error TS2304: Cannot find name 'NodeType'. @@ -848,7 +848,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.recordSourceMappingStart(this); emitter.emitJavascriptList(this, null, TokenID.Semicolon, startLine, false, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? emitter.recordSourceMappingEnd(this); } @@ -1139,7 +1139,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error !!! error TS2304: Cannot find name 'NodeType'. emitter.emitJavascript(this.operand, TokenID.PlusPlus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? emitter.writeToOutput("++"); break; case NodeType.LogNot: @@ -1148,14 +1148,14 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.writeToOutput("!"); emitter.emitJavascript(this.operand, TokenID.Exclamation, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.DecPost: ~~~~~~~~ !!! error TS2304: Cannot find name 'NodeType'. emitter.emitJavascript(this.operand, TokenID.MinusMinus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? emitter.writeToOutput("--"); break; case NodeType.ObjectLit: @@ -1174,7 +1174,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.writeToOutput("~"); emitter.emitJavascript(this.operand, TokenID.Tilde, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.Neg: ~~~~~~~~ @@ -1187,7 +1187,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error } emitter.emitJavascript(this.operand, TokenID.Minus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.Pos: ~~~~~~~~ @@ -1200,7 +1200,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error } emitter.emitJavascript(this.operand, TokenID.Plus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.IncPre: ~~~~~~~~ @@ -1208,7 +1208,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.writeToOutput("++"); emitter.emitJavascript(this.operand, TokenID.PlusPlus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.DecPre: ~~~~~~~~ @@ -1216,7 +1216,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.writeToOutput("--"); emitter.emitJavascript(this.operand, TokenID.MinusMinus, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? break; case NodeType.Throw: ~~~~~~~~ @@ -1224,7 +1224,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource11.ts(2356,48): error emitter.writeToOutput("throw "); emitter.emitJavascript(this.operand, TokenID.Tilde, false); ~~~~~~~ -!!! error TS2304: Cannot find name 'TokenID'. +!!! error TS2552: Cannot find name 'TokenID'. Did you mean 'tokenId'? emitter.writeToOutput(";"); break; case NodeType.Typeof: diff --git a/tests/baselines/reference/parserRealSource13.errors.txt b/tests/baselines/reference/parserRealSource13.errors.txt index 6ddc41ed6109c..ddf67bb6dadc0 100644 --- a/tests/baselines/reference/parserRealSource13.errors.txt +++ b/tests/baselines/reference/parserRealSource13.errors.txt @@ -113,7 +113,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(123,26): error tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(123,39): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(128,33): error TS2339: Property 'getAstWalkerFactory' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(132,51): error TS2304: Cannot find name 'AST'. -tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(135,36): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(135,36): error TS2552: Cannot find name 'NodeType'. Did you mean 'nodeType'? ==== tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts (116 errors) ==== @@ -483,7 +483,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource13.ts(135,36): error var nodeType = ast.nodeType; var callbackString = (NodeType)._map[nodeType] + "Callback"; ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. +!!! error TS2552: Cannot find name 'NodeType'. Did you mean 'nodeType'? if (callback[callbackString]) { return callback[callbackString](pre, ast); } diff --git a/tests/baselines/reference/parserRealSource7.errors.txt b/tests/baselines/reference/parserRealSource7.errors.txt index a3635dabc485e..1261d7b5f0655 100644 --- a/tests/baselines/reference/parserRealSource7.errors.txt +++ b/tests/baselines/reference/parserRealSource7.errors.txt @@ -1,9 +1,9 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(4,1): error TS6053: File 'tests/cases/conformance/parser/ecmascript5/typescript.ts' not found. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(12,38): error TS2304: Cannot find name 'ASTList'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(12,62): error TS2304: Cannot find name 'TypeLink'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,37): error TS2304: Cannot find name 'TypeLink'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,37): error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(16,45): error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(21,36): error TS2304: Cannot find name 'TypeLink'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(21,36): error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,29): error TS2304: Cannot find name 'Type'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(29,45): error TS2304: Cannot find name 'TypeDeclaration'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,43): error TS2304: Cannot find name 'Type'. @@ -11,11 +11,11 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,54): error TS tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(34,68): error TS2304: Cannot find name 'TypeCollectionContext'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(35,25): error TS2304: Cannot find name 'ValueLocation'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(36,30): error TS2304: Cannot find name 'TypeLink'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(41,17): error TS2304: Cannot find name 'FieldSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(41,17): error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(43,31): error TS2304: Cannot find name 'SymbolFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(43,54): error TS2304: Cannot find name 'SymbolFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(49,58): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(50,29): error TS2304: Cannot find name 'Signature'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(50,29): error TS2552: Cannot find name 'Signature'. Did you mean 'signature'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(51,36): error TS2304: Cannot find name 'TypeLink'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(55,30): error TS2304: Cannot find name 'SignatureGroup'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(59,66): error TS2304: Cannot find name 'Type'. @@ -46,7 +46,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(154,27): error T tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(155,26): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(155,55): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(165,28): error TS2304: Cannot find name 'ModuleType'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(169,26): error TS2304: Cannot find name 'TypeSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(169,26): error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(186,48): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(186,61): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(186,75): error TS2304: Cannot find name 'TypeCollectionContext'. @@ -81,8 +81,8 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(212,46): error T tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(212,64): error TS2304: Cannot find name 'DualStringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(212,88): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(212,111): error TS2304: Cannot find name 'StringHashTable'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(216,30): error TS2304: Cannot find name 'TypeSymbol'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(231,72): error TS2304: Cannot find name 'NodeType'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(216,30): error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(231,72): error TS2552: Cannot find name 'NodeType'. Did you mean 'modType'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(234,27): error TS2304: Cannot find name 'TypeSymbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(238,80): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(239,37): error TS2304: Cannot find name 'ScopedMembers'. @@ -142,7 +142,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(349,47): error T tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(349,65): error TS2304: Cannot find name 'DualStringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(349,89): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(349,112): error TS2304: Cannot find name 'StringHashTable'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(350,30): error TS2304: Cannot find name 'TypeSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(350,30): error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(360,37): error TS2304: Cannot find name 'SymbolFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(364,37): error TS2304: Cannot find name 'SymbolFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(368,37): error TS2304: Cannot find name 'SymbolFlags'. @@ -196,7 +196,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(476,57): error T tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(477,29): error TS2304: Cannot find name 'ValueLocation'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(478,29): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(478,55): error TS2304: Cannot find name 'VarFlags'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(480,21): error TS2304: Cannot find name 'FieldSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(480,21): error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(482,34): error TS2304: Cannot find name 'hasFlag'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(482,60): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(492,30): error TS2304: Cannot find name 'getTypeLink'. @@ -218,7 +218,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(507,26): error T tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(507,52): error TS2304: Cannot find name 'ASTFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(518,22): error TS2304: Cannot find name 'FieldSymbol'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(531,29): error TS2304: Cannot find name 'ValueLocation'. -tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(533,21): error TS2304: Cannot find name 'FieldSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(533,21): error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(535,53): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(535,75): error TS2304: Cannot find name 'VarFlags'. tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(539,38): error TS2304: Cannot find name 'SymbolFlags'. @@ -327,7 +327,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T if (baseTypeLinks == null) { baseTypeLinks = new TypeLink[]; ~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeLink'. +!!! error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? ~~ !!! error TS1150: 'new T[]' cannot be used to create an array. Use 'new Array()' instead. } @@ -336,7 +336,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T var name = baseExpr; var typeLink = new TypeLink(); ~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeLink'. +!!! error TS2552: Cannot find name 'TypeLink'. Did you mean 'typeLink'? typeLink.ast = name; baseTypeLinks[baseTypeLinks.length] = typeLink; } @@ -372,7 +372,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T var fieldSymbol = new FieldSymbol("prototype", ast.minChar, ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'FieldSymbol'. +!!! error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? context.checker.locationInfo.unitIndex, true, field); fieldSymbol.flags |= (SymbolFlags.Property | SymbolFlags.BuiltIn); ~~~~~~~~~~~ @@ -389,7 +389,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T !!! error TS2304: Cannot find name 'Type'. var signature = new Signature(); ~~~~~~~~~ -!!! error TS2304: Cannot find name 'Signature'. +!!! error TS2552: Cannot find name 'Signature'. Did you mean 'signature'? signature.returnType = new TypeLink(); ~~~~~~~~ !!! error TS2304: Cannot find name 'TypeLink'. @@ -570,7 +570,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T typeSymbol = new TypeSymbol(importDecl.id.text, importDecl.minChar, ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeSymbol'. +!!! error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? context.checker.locationInfo.unitIndex, modType); typeSymbol.aliasLink = importDecl; @@ -687,7 +687,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T typeSymbol = new TypeSymbol(modName, moduleDecl.minChar, ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeSymbol'. +!!! error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? context.checker.locationInfo.unitIndex, modType); if (context.scopeChain.moduleDecl) { @@ -704,7 +704,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T else { if (symbol && symbol.declAST && symbol.declAST.nodeType != NodeType.ModuleDeclaration) { ~~~~~~~~ -!!! error TS2304: Cannot find name 'NodeType'. +!!! error TS2552: Cannot find name 'NodeType'. Did you mean 'modType'? context.checker.errorReporter.simpleError(moduleDecl, "Conflicting symbol name for module '" + modName + "'"); } typeSymbol = symbol; @@ -943,7 +943,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T !!! error TS2304: Cannot find name 'StringHashTable'. typeSymbol = new TypeSymbol(className, classDecl.minChar, ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeSymbol'. +!!! error TS2552: Cannot find name 'TypeSymbol'. Did you mean 'typeSymbol'? context.checker.locationInfo.unitIndex, classType); typeSymbol.declAST = classDecl; typeSymbol.instanceType = instanceType; @@ -1181,7 +1181,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T var fieldSymbol = new FieldSymbol(argDecl.id.text, argDecl.minChar, ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'FieldSymbol'. +!!! error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? context.checker.locationInfo.unitIndex, !hasFlag(argDecl.varFlags, VarFlags.Readonly), ~~~~~~~ @@ -1278,7 +1278,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource7.ts(828,13): error T var fieldSymbol = new FieldSymbol(varDecl.id.text, varDecl.minChar, ~~~~~~~~~~~ -!!! error TS2304: Cannot find name 'FieldSymbol'. +!!! error TS2552: Cannot find name 'FieldSymbol'. Did you mean 'fieldSymbol'? context.checker.locationInfo.unitIndex, (varDecl.varFlags & VarFlags.Readonly) == VarFlags.None, ~~~~~~~~ diff --git a/tests/baselines/reference/parserRealSource8.errors.txt b/tests/baselines/reference/parserRealSource8.errors.txt index 6249d3fd991ac..4fbf039ae0ae7 100644 --- a/tests/baselines/reference/parserRealSource8.errors.txt +++ b/tests/baselines/reference/parserRealSource8.errors.txt @@ -47,7 +47,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(160,52): error T tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(160,76): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(160,99): error TS2304: Cannot find name 'StringHashTable'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(162,28): error TS2304: Cannot find name 'Type'. -tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(163,30): error TS2304: Cannot find name 'WithSymbol'. +tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(163,30): error TS2552: Cannot find name 'WithSymbol'. Did you mean 'withSymbol'? tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(170,40): error TS2339: Property 'SymbolScopeBuilder' does not exist on type 'typeof TypeScript'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(176,50): error TS2304: Cannot find name 'AST'. tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(177,25): error TS2304: Cannot find name 'FuncDecl'. @@ -397,7 +397,7 @@ tests/cases/conformance/parser/ecmascript5/parserRealSource8.ts(454,35): error T !!! error TS2304: Cannot find name 'Type'. var withSymbol = new WithSymbol(withStmt.minChar, context.typeFlow.checker.locationInfo.unitIndex, withType); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'WithSymbol'. +!!! error TS2552: Cannot find name 'WithSymbol'. Did you mean 'withSymbol'? withType.members = members; withType.ambientMembers = ambientMembers; withType.symbol = withSymbol; diff --git a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt index c86756b4ab1f2..3d35062bfc21a 100644 --- a/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/parserS7.2_A1.5_T2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(14,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(14,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? ==== tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts (2 errors) ==== @@ -18,7 +18,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS if (x !== 1) { $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } //CHECK#2 @@ -26,7 +26,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.2_A1.5_T2.ts(20,3): error TS if (x !== 1) { $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt index e999066aa412c..d4131cc799d69 100644 --- a/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/parserS7.3_A1.1_T2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? ==== tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts (1 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/parser/ecmascript5/parserS7.3_A1.1_T2.ts(17,3): error TS if (x !== 1) { $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } \ No newline at end of file diff --git a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt index 153fb96ddac33..53865fd69abc1 100644 --- a/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/parserS7.6_A4.2_T1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(14,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(18,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(22,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(26,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(30,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(34,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(38,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(42,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(46,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(50,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(14,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(18,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(22,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(26,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(30,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(34,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(38,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(42,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(46,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(50,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(54,3): error TS2304: Cannot find name '$ERROR'. tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(58,3): error TS2304: Cannot find name '$ERROR'. tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(62,3): error TS2304: Cannot find name '$ERROR'. @@ -49,61 +49,61 @@ tests/cases/conformance/parser/ecmascript5/parserS7.6_A4.2_T1.ts(142,3): error T if (А !== 1) { $ERROR('#А'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/parserSkippedTokens16.errors.txt b/tests/baselines/reference/parserSkippedTokens16.errors.txt index fc3565e97867c..3f0321ed00ca6 100644 --- a/tests/baselines/reference/parserSkippedTokens16.errors.txt +++ b/tests/baselines/reference/parserSkippedTokens16.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts(1,1): error TS2304: Cannot find name 'foo'. +tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts(1,1): error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts(1,6): error TS1005: ';' expected. tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts(1,8): error TS2304: Cannot find name 'Bar'. tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts(1,12): error TS1005: ';' expected. @@ -11,7 +11,7 @@ tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.t ==== tests/cases/conformance/parser/ecmascript5/SkippedTokens/parserSkippedTokens16.ts (8 errors) ==== foo(): Bar { } ~~~ -!!! error TS2304: Cannot find name 'foo'. +!!! error TS2552: Cannot find name 'foo'. Did you mean 'Foo'? ~ !!! error TS1005: ';' expected. ~~~ diff --git a/tests/baselines/reference/parserSymbolIndexer5.errors.txt b/tests/baselines/reference/parserSymbolIndexer5.errors.txt index a8c19338e017b..7906d08912c60 100644 --- a/tests/baselines/reference/parserSymbolIndexer5.errors.txt +++ b/tests/baselines/reference/parserSymbolIndexer5.errors.txt @@ -1,6 +1,6 @@ tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,6): error TS2304: Cannot find name 's'. tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,7): error TS1005: ']' expected. -tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,9): error TS2304: Cannot find name 'symbol'. +tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,9): error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,15): error TS1005: ',' expected. tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(2,16): error TS1136: Property assignment expected. tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(3,1): error TS1005: ':' expected. @@ -14,7 +14,7 @@ tests/cases/conformance/parser/ecmascript6/Symbols/parserSymbolIndexer5.ts(3,1): ~ !!! error TS1005: ']' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'symbol'. +!!! error TS2552: Cannot find name 'symbol'. Did you mean 'Symbol'? ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/parserUnicode1.errors.txt b/tests/baselines/reference/parserUnicode1.errors.txt index 6f56522c05ce6..d04e136a53401 100644 --- a/tests/baselines/reference/parserUnicode1.errors.txt +++ b/tests/baselines/reference/parserUnicode1.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(6,5): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(6,5): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? ==== tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts (2 errors) ==== @@ -10,12 +10,12 @@ tests/cases/conformance/parser/ecmascript5/parserUnicode1.ts(10,5): error TS2304 $ERROR('#6.1: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } } catch (e) { $ERROR('#6.2: var \\u0078x = 1; xx === 6. Actual: ' + (xx)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } \ No newline at end of file diff --git a/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt b/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt index a2be22d5ee0c6..e38a548f34c97 100644 --- a/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt +++ b/tests/baselines/reference/parserUnterminatedGeneric2.errors.txt @@ -4,12 +4,12 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGener tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,9): error TS2304: Cannot find name 'assign'. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,16): error TS2304: Cannot find name 'context'. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,23): error TS1005: ',' expected. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,25): error TS2304: Cannot find name 'any'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,25): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,30): error TS2304: Cannot find name 'value'. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,35): error TS1005: ',' expected. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,37): error TS2304: Cannot find name 'any'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,37): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,41): error TS1005: ';' expected. -tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,43): error TS2304: Cannot find name 'any'. +tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(4,43): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,23): error TS2304: Cannot find name 'IPromise'. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,45): error TS2304: Cannot find name 'IPromise'. tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGeneric2.ts(8,54): error TS1005: '>' expected. @@ -33,17 +33,17 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserUnterminatedGener ~ !!! error TS1005: ',' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. ~~~~~ !!! error TS2304: Cannot find name 'value'. ~ !!! error TS1005: ',' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. } interface IQService { diff --git a/tests/baselines/reference/parserharness.errors.txt b/tests/baselines/reference/parserharness.errors.txt index d3d0c4056a1d5..d4aa6682c4008 100644 --- a/tests/baselines/reference/parserharness.errors.txt +++ b/tests/baselines/reference/parserharness.errors.txt @@ -16,19 +16,19 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(691,50): e tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(716,47): error TS2503: Cannot find namespace 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(721,62): error TS2304: Cannot find name 'ITextWriter'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(724,29): error TS2304: Cannot find name 'ITextWriter'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(754,53): error TS2304: Cannot find name 'TypeScript'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(754,53): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(764,56): error TS2503: Cannot find namespace 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(765,37): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(767,47): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,13): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,42): error TS2304: Cannot find name 'TypeScript'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(765,37): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(767,47): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,13): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(776,42): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(781,23): error TS2503: Cannot find namespace 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(794,49): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(795,49): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,53): error TS2304: Cannot find name 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,89): error TS2304: Cannot find name 'TypeScript'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(794,49): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(795,49): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,53): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,89): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,115): error TS2503: Cannot find namespace 'TypeScript'. -tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,145): error TS2304: Cannot find name 'TypeScript'. +tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(987,145): error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(988,43): error TS2304: Cannot find name 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(999,40): error TS2503: Cannot find namespace 'TypeScript'. tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(1041,43): error TS2503: Cannot find namespace 'TypeScript'. @@ -902,7 +902,7 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): var libFolder: string = global['WScript'] ? TypeScript.filePath(global['WScript'].ScriptFullName) : (__dirname + '/'); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? export var libText = IO ? IO.readFile(libFolder + "lib.d.ts") : ''; var stdout = new EmitterIOHost(); @@ -917,11 +917,11 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): !!! error TS2503: Cannot find namespace 'TypeScript'. var compiler = c || new TypeScript.TypeScriptCompiler(stderr); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? compiler.parser.errorRecovery = true; compiler.settings.codeGenTarget = TypeScript.CodeGenTarget.ES5; ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? compiler.settings.controlFlow = true; compiler.settings.controlFlowUseDef = true; if (Harness.usePull) { @@ -932,9 +932,9 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): compiler.parseEmitOption(stdout); TypeScript.moduleGenTarget = TypeScript.ModuleGenTarget.Synchronous; ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? compiler.addUnit(Harness.Compiler.libText, "lib.d.ts", true); return compiler; } @@ -956,10 +956,10 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): // requires unit to already exist in the compiler compiler.pullUpdateUnit(new TypeScript.StringSourceText(""), filename, true); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? compiler.pullUpdateUnit(new TypeScript.StringSourceText(code), filename, true); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? } } else { @@ -1153,13 +1153,13 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32): var script = compiler.scripts.members[m]; var enclosingScopeContext = TypeScript.findEnclosingScopeAt(new TypeScript.NullLogger(), script, new TypeScript.StringSourceText(code), 0, false); ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? ~~~~~~~~~~ !!! error TS2503: Cannot find namespace 'TypeScript'. ~~~~~~~~~~ -!!! error TS2304: Cannot find name 'TypeScript'. +!!! error TS2552: Cannot find name 'TypeScript'. Did you mean 'TypeScriptLS'? var entries = new TypeScript.ScopeTraversal(compiler).getScopeEntries(enclosingScopeContext); ~~~~~~~~~~ !!! error TS2304: Cannot find name 'TypeScript'. diff --git a/tests/baselines/reference/primitiveTypeAssignment.errors.txt b/tests/baselines/reference/primitiveTypeAssignment.errors.txt index 3985a9acdc5fe..1800e1657e099 100644 --- a/tests/baselines/reference/primitiveTypeAssignment.errors.txt +++ b/tests/baselines/reference/primitiveTypeAssignment.errors.txt @@ -1,18 +1,18 @@ -tests/cases/compiler/primitiveTypeAssignment.ts(1,9): error TS2304: Cannot find name 'any'. -tests/cases/compiler/primitiveTypeAssignment.ts(3,9): error TS2304: Cannot find name 'number'. -tests/cases/compiler/primitiveTypeAssignment.ts(5,9): error TS2304: Cannot find name 'boolean'. +tests/cases/compiler/primitiveTypeAssignment.ts(1,9): error TS2693: 'any' only refers to a type, but is being used as a value here. +tests/cases/compiler/primitiveTypeAssignment.ts(3,9): error TS2693: 'number' only refers to a type, but is being used as a value here. +tests/cases/compiler/primitiveTypeAssignment.ts(5,9): error TS2693: 'boolean' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/primitiveTypeAssignment.ts (3 errors) ==== var x = any; ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. var y = number; ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. var z = boolean; ~~~~~~~ -!!! error TS2304: Cannot find name 'boolean'. +!!! error TS2693: 'boolean' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/baselines/reference/privateIndexer2.errors.txt b/tests/baselines/reference/privateIndexer2.errors.txt index 9f087b2237996..7e826dbc7a9df 100644 --- a/tests/baselines/reference/privateIndexer2.errors.txt +++ b/tests/baselines/reference/privateIndexer2.errors.txt @@ -1,5 +1,5 @@ tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,15): error TS1005: ']' expected. -tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,17): error TS2304: Cannot find name 'string'. +tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,17): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,23): error TS1005: ',' expected. tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,24): error TS1136: Property assignment expected. tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,32): error TS1005: ':' expected. @@ -13,7 +13,7 @@ tests/cases/conformance/classes/indexMemberDeclarations/privateIndexer2.ts(4,32) ~ !!! error TS1005: ']' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ',' expected. ~ diff --git a/tests/baselines/reference/propertyOrdering.errors.txt b/tests/baselines/reference/propertyOrdering.errors.txt index ded6ec01aff9e..f9f638f592dcb 100644 --- a/tests/baselines/reference/propertyOrdering.errors.txt +++ b/tests/baselines/reference/propertyOrdering.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/propertyOrdering.ts(6,23): error TS2304: Cannot find name 'store'. -tests/cases/compiler/propertyOrdering.ts(9,34): error TS2339: Property 'store' does not exist on type 'Foo'. +tests/cases/compiler/propertyOrdering.ts(9,34): error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? tests/cases/compiler/propertyOrdering.ts(16,25): error TS2339: Property '_store' does not exist on type 'Bar'. tests/cases/compiler/propertyOrdering.ts(20,14): error TS2339: Property '_store' does not exist on type 'Bar'. @@ -17,7 +17,7 @@ tests/cases/compiler/propertyOrdering.ts(20,14): error TS2339: Property '_store' public bar() { return this.store; } // should be an error ~~~~~ -!!! error TS2339: Property 'store' does not exist on type 'Foo'. +!!! error TS2551: Property 'store' does not exist on type 'Foo'. Did you mean '_store'? } diff --git a/tests/baselines/reference/propertySignatures.errors.txt b/tests/baselines/reference/propertySignatures.errors.txt index fd415334e74a9..60a393aef4de5 100644 --- a/tests/baselines/reference/propertySignatures.errors.txt +++ b/tests/baselines/reference/propertySignatures.errors.txt @@ -1,6 +1,6 @@ tests/cases/compiler/propertySignatures.ts(2,13): error TS2300: Duplicate identifier 'a'. tests/cases/compiler/propertySignatures.ts(2,23): error TS2300: Duplicate identifier 'a'. -tests/cases/compiler/propertySignatures.ts(14,12): error TS2304: Cannot find name 'foo'. +tests/cases/compiler/propertySignatures.ts(14,12): error TS2552: Cannot find name 'foo'. Did you mean 'foo1'? ==== tests/cases/compiler/propertySignatures.ts (3 errors) ==== @@ -23,7 +23,7 @@ tests/cases/compiler/propertySignatures.ts(14,12): error TS2304: Cannot find nam var foo4: { (): void; }; var test = foo(); ~~~ -!!! error TS2304: Cannot find name 'foo'. +!!! error TS2552: Cannot find name 'foo'. Did you mean 'foo1'? // Should be OK var foo5: {();}; diff --git a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt index 94200267e6213..97d580c9b4b0c 100644 --- a/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.2_A1.5_T2.errors.txt @@ -1,5 +1,5 @@ -tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(14,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(14,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? ==== tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts (2 errors) ==== @@ -18,7 +18,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error if (x !== 1) { $ERROR('#1: eval("\\u00A0var x\\u00A0= 1\\u00A0"); x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } //CHECK#2 @@ -26,7 +26,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.2_A1.5_T2.ts(20,3): error if (x !== 1) { $ERROR('#2:  var x = 1 ; x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } diff --git a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt index 278e1d796211b..186427f5de957 100644 --- a/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt +++ b/tests/baselines/reference/scannerS7.3_A1.1_T2.errors.txt @@ -1,4 +1,4 @@ -tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? ==== tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts (1 errors) ==== @@ -20,7 +20,7 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.3_A1.1_T2.ts(17,3): error if (x !== 1) { $ERROR('#1: var\\nx\\n=\\n1\\n; x === 1. Actual: ' + (x)); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } \ No newline at end of file diff --git a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt index 97925d675494d..0213122e54f1d 100644 --- a/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt +++ b/tests/baselines/reference/scannerS7.6_A4.2_T1.errors.txt @@ -1,13 +1,13 @@ -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(14,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(18,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(22,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(26,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(30,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(34,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(38,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(42,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(46,3): error TS2304: Cannot find name '$ERROR'. -tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(50,3): error TS2304: Cannot find name '$ERROR'. +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(14,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(18,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(22,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(26,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(30,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(34,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(38,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(42,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(46,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? +tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(50,3): error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(54,3): error TS2304: Cannot find name '$ERROR'. tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(58,3): error TS2304: Cannot find name '$ERROR'. tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(62,3): error TS2304: Cannot find name '$ERROR'. @@ -49,61 +49,61 @@ tests/cases/conformance/scanner/ecmascript5/scannerS7.6_A4.2_T1.ts(142,3): error if (А !== 1) { $ERROR('#А'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0411 = 1; if (Б !== 1) { $ERROR('#Б'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0412 = 1; if (В !== 1) { $ERROR('#В'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0413 = 1; if (Г !== 1) { $ERROR('#Г'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0414 = 1; if (Д !== 1) { $ERROR('#Д'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0415 = 1; if (Е !== 1) { $ERROR('#Е'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0416 = 1; if (Ж !== 1) { $ERROR('#Ж'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0417 = 1; if (З !== 1) { $ERROR('#З'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0418 = 1; if (И !== 1) { $ERROR('#И'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u0419 = 1; if (Й !== 1) { $ERROR('#Й'); ~~~~~~ -!!! error TS2304: Cannot find name '$ERROR'. +!!! error TS2552: Cannot find name '$ERROR'. Did you mean 'Error'? } var \u041A = 1; if (К !== 1) { diff --git a/tests/baselines/reference/staticsInAFunction.errors.txt b/tests/baselines/reference/staticsInAFunction.errors.txt index 48104fd52f4f6..254f321913b9f 100644 --- a/tests/baselines/reference/staticsInAFunction.errors.txt +++ b/tests/baselines/reference/staticsInAFunction.errors.txt @@ -5,12 +5,12 @@ tests/cases/compiler/staticsInAFunction.ts(3,4): error TS1128: Declaration or st tests/cases/compiler/staticsInAFunction.ts(3,11): error TS2304: Cannot find name 'test'. tests/cases/compiler/staticsInAFunction.ts(3,16): error TS2304: Cannot find name 'name'. tests/cases/compiler/staticsInAFunction.ts(3,20): error TS1005: ',' expected. -tests/cases/compiler/staticsInAFunction.ts(3,21): error TS2304: Cannot find name 'string'. +tests/cases/compiler/staticsInAFunction.ts(3,21): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/compiler/staticsInAFunction.ts(4,4): error TS1128: Declaration or statement expected. tests/cases/compiler/staticsInAFunction.ts(4,11): error TS2304: Cannot find name 'test'. tests/cases/compiler/staticsInAFunction.ts(4,16): error TS2304: Cannot find name 'name'. tests/cases/compiler/staticsInAFunction.ts(4,21): error TS1109: Expression expected. -tests/cases/compiler/staticsInAFunction.ts(4,22): error TS2304: Cannot find name 'any'. +tests/cases/compiler/staticsInAFunction.ts(4,22): error TS2693: 'any' only refers to a type, but is being used as a value here. tests/cases/compiler/staticsInAFunction.ts(4,26): error TS1005: ';' expected. @@ -33,7 +33,7 @@ tests/cases/compiler/staticsInAFunction.ts(4,26): error TS1005: ';' expected. ~ !!! error TS1005: ',' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. static test(name?:any){} ~~~~~~ !!! error TS1128: Declaration or statement expected. @@ -44,7 +44,7 @@ tests/cases/compiler/staticsInAFunction.ts(4,26): error TS1005: ';' expected. ~ !!! error TS1109: Expression expected. ~~~ -!!! error TS2304: Cannot find name 'any'. +!!! error TS2693: 'any' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. } diff --git a/tests/baselines/reference/strictModeReservedWord.errors.txt b/tests/baselines/reference/strictModeReservedWord.errors.txt index 5a6de7792b77b..f2f74c81a9352 100644 --- a/tests/baselines/reference/strictModeReservedWord.errors.txt +++ b/tests/baselines/reference/strictModeReservedWord.errors.txt @@ -38,7 +38,7 @@ tests/cases/compiler/strictModeReservedWord.ts(22,12): error TS1212: Identifier 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(23,5): error TS2304: Cannot find name 'ublic'. +tests/cases/compiler/strictModeReservedWord.ts(23,5): error TS2552: Cannot find name 'ublic'. Did you mean 'public'? 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. @@ -148,7 +148,7 @@ tests/cases/compiler/strictModeReservedWord.ts(24,5): error TS2349: Cannot invok !!! error TS1212: Identifier expected. 'implements' is a reserved word in strict mode. ublic(); ~~~~~ -!!! error TS2304: Cannot find name 'ublic'. +!!! error TS2552: Cannot find name 'ublic'. Did you mean 'public'? static(); ~~~~~~ !!! error TS1212: Identifier expected. 'static' is a reserved word in strict mode. diff --git a/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt b/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt index e88f4c1ca964f..a3771839dc5de 100644 --- a/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt +++ b/tests/baselines/reference/thisTypeInFunctionsNegative.errors.txt @@ -91,7 +91,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,30): e tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,32): error TS1138: Parameter declaration expected. tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,39): error TS1005: ';' expected. tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,40): error TS1128: Declaration or statement expected. -tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,42): error TS2304: Cannot find name 'number'. +tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,42): error TS2693: 'number' only refers to a type, but is being used as a value here. tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(172,49): error TS1005: ';' expected. tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,1): error TS7027: Unreachable code detected. tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,29): error TS2304: Cannot find name 'm'. @@ -425,7 +425,7 @@ tests/cases/conformance/types/thisType/thisTypeInFunctionsNegative.ts(175,35): e ~ !!! error TS1128: Declaration or statement expected. ~~~~~~ -!!! error TS2304: Cannot find name 'number'. +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. diff --git a/tests/baselines/reference/typeAssertions.errors.txt b/tests/baselines/reference/typeAssertions.errors.txt index c840e01608319..cdd576e6d8b5a 100644 --- a/tests/baselines/reference/typeAssertions.errors.txt +++ b/tests/baselines/reference/typeAssertions.errors.txt @@ -11,7 +11,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,5): erro tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,14): error TS1005: '>' expected. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,14): error TS2304: Cannot find name 'is'. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,17): error TS1005: ')' expected. -tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,17): error TS2304: Cannot find name 'string'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,17): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(44,48): error TS1005: ';' expected. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(45,2): error TS2322: Type 'string | number' is not assignable to type 'string'. Type 'number' is not assignable to type 'string'. @@ -19,7 +19,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,32): err tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,41): error TS1005: ')' expected. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,41): error TS2304: Cannot find name 'is'. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): error TS1005: ';' expected. -tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): error TS2304: Cannot find name 'string'. +tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,44): error TS2693: 'string' only refers to a type, but is being used as a value here. tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): error TS1005: ';' expected. @@ -91,7 +91,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err ~~~~~~ !!! error TS1005: ')' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. str = numOrStr; // Error, no narrowing occurred @@ -110,7 +110,7 @@ tests/cases/conformance/expressions/typeAssertions/typeAssertions.ts(48,50): err ~~~~~~ !!! error TS1005: ';' expected. ~~~~~~ -!!! error TS2304: Cannot find name 'string'. +!!! error TS2693: 'string' only refers to a type, but is being used as a value here. ~ !!! error TS1005: ';' expected. } diff --git a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt index d50d86afa5eee..b9d884939bd30 100644 --- a/tests/baselines/reference/typeGuardFunctionErrors.errors.txt +++ b/tests/baselines/reference/typeGuardFunctionErrors.errors.txt @@ -19,9 +19,9 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(41,56) Type 'number' is not assignable to type 'string'. tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(45,56): error TS2677: A type predicate's type must be assignable to its parameter's type. Type 'T[]' is not assignable to type 'string'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(59,7): error TS2339: Property 'propB' does not exist on type 'A'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(64,7): error TS2339: Property 'propB' does not exist on type 'A'. -tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(69,7): error TS2339: Property 'propB' does not exist on type 'A'. +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(59,7): error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(64,7): error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? +tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(69,7): error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(74,46): error TS2345: Argument of type '(p1: any) => p1 is C' is not assignable to parameter of type '(p1: any) => p1 is B'. Type predicate 'p1 is C' is not assignable to 'p1 is B'. Type 'C' is not assignable to type 'B'. @@ -163,21 +163,21 @@ tests/cases/conformance/expressions/typeGuards/typeGuardFunctionErrors.ts(136,39 if (isB(b)) { a.propB; ~~~~~ -!!! error TS2339: Property 'propB' does not exist on type 'A'. +!!! error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? } // Parameter index and argument index for the type guard target is not matching. if (funA(0, a)) { a.propB; // Error ~~~~~ -!!! error TS2339: Property 'propB' does not exist on type 'A'. +!!! error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? } // No type guard in if statement if (hasNoTypeGuard(a)) { a.propB; ~~~~~ -!!! error TS2339: Property 'propB' does not exist on type 'A'. +!!! error TS2551: Property 'propB' does not exist on type 'A'. Did you mean 'propA'? } // Type predicate type is not assignable diff --git a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt index 31db51bf57e92..b93be614f745c 100644 --- a/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt +++ b/tests/baselines/reference/typeGuardsWithInstanceOfByConstructorSignature.errors.txt @@ -22,8 +22,8 @@ tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstru tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(160,11): error TS2339: Property 'foo2' does not exist on type 'G1'. tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(166,11): error TS2339: Property 'foo2' does not exist on type 'G1'. tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(182,11): error TS2339: Property 'bar' does not exist on type 'H'. -tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(187,11): error TS2339: Property 'foo1' does not exist on type 'H'. -tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2339: Property 'foo2' does not exist on type 'H'. +tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(187,11): error TS2551: Property 'foo1' does not exist on type 'H'. Did you mean 'foo'? +tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts(188,11): error TS2551: Property 'foo2' does not exist on type 'H'. Did you mean 'foo'? ==== tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstructorSignature.ts (20 errors) ==== @@ -257,10 +257,10 @@ tests/cases/conformance/expressions/typeGuards/typeGuardsWithInstanceOfByConstru if (obj16 instanceof H) { obj16.foo1; ~~~~ -!!! error TS2339: Property 'foo1' does not exist on type 'H'. +!!! error TS2551: Property 'foo1' does not exist on type 'H'. Did you mean 'foo'? obj16.foo2; ~~~~ -!!! error TS2339: Property 'foo2' does not exist on type 'H'. +!!! error TS2551: Property 'foo2' does not exist on type 'H'. Did you mean 'foo'? } var obj17: any; diff --git a/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt b/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt index 872a0a10923a2..f01f7520cbad5 100644 --- a/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt +++ b/tests/baselines/reference/typeParametersAndParametersInComputedNames.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,10): error TS2304: Cannot find name 'T'. -tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,13): error TS2304: Cannot find name 'a'. +tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,13): error TS2552: Cannot find name 'a'. Did you mean 'A'? ==== tests/cases/compiler/typeParametersAndParametersInComputedNames.ts (2 errors) ==== @@ -12,6 +12,6 @@ tests/cases/compiler/typeParametersAndParametersInComputedNames.ts(6,13): error ~ !!! error TS2304: Cannot find name 'T'. ~ -!!! error TS2304: Cannot find name 'a'. +!!! error TS2552: Cannot find name 'a'. Did you mean 'A'? } } \ No newline at end of file diff --git a/tests/baselines/reference/undeclaredVarEmit.errors.txt b/tests/baselines/reference/undeclaredVarEmit.errors.txt index a95323aa362a0..bbf508ab005bc 100644 --- a/tests/baselines/reference/undeclaredVarEmit.errors.txt +++ b/tests/baselines/reference/undeclaredVarEmit.errors.txt @@ -1,5 +1,5 @@ tests/cases/compiler/undeclaredVarEmit.ts(1,1): error TS7028: Unused label. -tests/cases/compiler/undeclaredVarEmit.ts(1,4): error TS2304: Cannot find name 'number'. +tests/cases/compiler/undeclaredVarEmit.ts(1,4): error TS2693: 'number' only refers to a type, but is being used as a value here. ==== tests/cases/compiler/undeclaredVarEmit.ts (2 errors) ==== @@ -7,4 +7,4 @@ tests/cases/compiler/undeclaredVarEmit.ts(1,4): error TS2304: Cannot find name ' ~ !!! error TS7028: Unused label. ~~~~~~ -!!! error TS2304: Cannot find name 'number'. \ No newline at end of file +!!! error TS2693: 'number' only refers to a type, but is being used as a value here. \ No newline at end of file diff --git a/tests/cases/compiler/maximum10SpellingSuggestions.ts b/tests/cases/compiler/maximum10SpellingSuggestions.ts new file mode 100644 index 0000000000000..7aa27dc1e2ad0 --- /dev/null +++ b/tests/cases/compiler/maximum10SpellingSuggestions.ts @@ -0,0 +1,5 @@ +// 10 bobs on the first line +// the last two bobs should not have did-you-mean spelling suggestions +var blob; +bob; bob; bob; bob; bob; bob; bob; bob; bob; bob; +bob; bob; diff --git a/tests/cases/fourslash/codeFixAddMissingMember3.ts b/tests/cases/fourslash/codeFixAddMissingMember3.ts index 5864c9c10297f..47cacd6753a37 100644 --- a/tests/cases/fourslash/codeFixAddMissingMember3.ts +++ b/tests/cases/fourslash/codeFixAddMissingMember3.ts @@ -11,4 +11,4 @@ verify.rangeAfterCodeFix(`class C { static method() { this.foo = 10; } -}`); \ No newline at end of file +}`, /*includeWhiteSpace*/false, /*errorCode*/ undefined, /*index*/ 0); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport0.ts b/tests/cases/fourslash/importNameCodeFixExistingImport0.ts index 5e5be220688c7..e5b634998783c 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport0.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport0.ts @@ -7,4 +7,4 @@ //// export function f1() {} //// export var v1 = 5; -verify.importFixAtPosition([`{ v1, f1 }`]); \ No newline at end of file +verify.importFixAtPosition([`{ v1, f1 }`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport1.ts b/tests/cases/fourslash/importNameCodeFixExistingImport1.ts index 9571d0fcf57cc..49680692b6c58 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport1.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport1.ts @@ -8,4 +8,4 @@ //// export var v1 = 5; //// export default var d1 = 6; -verify.importFixAtPosition([`{ v1, f1 }`]); \ No newline at end of file +verify.importFixAtPosition([`{ v1, f1 }`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport10.ts b/tests/cases/fourslash/importNameCodeFixExistingImport10.ts index 8a178e727300d..a9525d272da00 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport10.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport10.ts @@ -18,4 +18,4 @@ verify.importFixAtPosition([ v2, f1 }` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport11.ts b/tests/cases/fourslash/importNameCodeFixExistingImport11.ts index 8822356c13aac..786e0e397756e 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport11.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport11.ts @@ -18,4 +18,4 @@ verify.importFixAtPosition([ v3, f1 }` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport12.ts b/tests/cases/fourslash/importNameCodeFixExistingImport12.ts index e00dee504c5f2..87ba29ab0aa21 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport12.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport12.ts @@ -9,4 +9,4 @@ //// export var v2 = 5; //// export var v3 = 5; -verify.importFixAtPosition([`{ f1 }`]); \ No newline at end of file +verify.importFixAtPosition([`{ f1 }`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport2.ts b/tests/cases/fourslash/importNameCodeFixExistingImport2.ts index 6a92976f4ef68..1146f24aeae1e 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport2.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport2.ts @@ -12,5 +12,5 @@ verify.importFixAtPosition([ import { f1 } from "./module"; f1();`, `import * as ns from "./module"; -ns.f1();` -]); \ No newline at end of file +ns.f1();`, +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport3.ts b/tests/cases/fourslash/importNameCodeFixExistingImport3.ts index bc00e8d420a07..9fc44378713b6 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport3.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport3.ts @@ -14,5 +14,5 @@ verify.importFixAtPosition([ ns.f1();`, `import d, * as ns from "./module" ; import { f1 } from "./module"; -f1();`, -]); \ No newline at end of file +f1();` +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport4.ts b/tests/cases/fourslash/importNameCodeFixExistingImport4.ts index d93cb73664e4c..1aaf34f598c48 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport4.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport4.ts @@ -11,4 +11,4 @@ verify.importFixAtPosition([ `import d, { f1 } from "./module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport5.ts b/tests/cases/fourslash/importNameCodeFixExistingImport5.ts index ed9297124d936..bfcf888b17ba3 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport5.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport5.ts @@ -9,4 +9,4 @@ verify.importFixAtPosition([`import "./module"; import { f1 } from "./module"; -f1();`]); \ No newline at end of file +f1();`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport6.ts b/tests/cases/fourslash/importNameCodeFixExistingImport6.ts index 7ae157a51ceb9..0d3636e443955 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport6.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport6.ts @@ -10,4 +10,4 @@ //// export var v1 = 5; //// export function f1(); -verify.importFixAtPosition([`{ v1, f1 }`]); \ No newline at end of file +verify.importFixAtPosition([`{ v1, f1 }`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport7.ts b/tests/cases/fourslash/importNameCodeFixExistingImport7.ts index 249929eabc7a0..f0b1a77f69012 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport7.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport7.ts @@ -7,4 +7,4 @@ //// export var v1 = 5; //// export function f1(); -verify.importFixAtPosition([`{ v1, f1 }`]); \ No newline at end of file +verify.importFixAtPosition([`{ v1, f1 }`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport8.ts b/tests/cases/fourslash/importNameCodeFixExistingImport8.ts index da7beaa0a4769..a1b676a8b8309 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport8.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport8.ts @@ -9,4 +9,4 @@ //// export var v2 = 5; //// export var v3 = 5; -verify.importFixAtPosition([`{v1, v2, v3, f1,}`]); \ No newline at end of file +verify.importFixAtPosition([`{v1, v2, v3, f1,}`]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImport9.ts b/tests/cases/fourslash/importNameCodeFixExistingImport9.ts index 51496abff12eb..67960de32d4c2 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImport9.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImport9.ts @@ -13,4 +13,4 @@ verify.importFixAtPosition([ `{ v1, f1 }` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixExistingImportEquals0.ts b/tests/cases/fourslash/importNameCodeFixExistingImportEquals0.ts index f431e6356d126..de86ed13cd54b 100644 --- a/tests/cases/fourslash/importNameCodeFixExistingImportEquals0.ts +++ b/tests/cases/fourslash/importNameCodeFixExistingImportEquals0.ts @@ -15,4 +15,4 @@ var x = ns.v1 + 5;`, `import ns = require("ambient-module"); import { v1 } from "ambient-module"; var x = v1 + 5;`, -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportAmbient0.ts b/tests/cases/fourslash/importNameCodeFixNewImportAmbient0.ts index 1d7b5bc3e7f33..75ef89ee4a52a 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportAmbient0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportAmbient0.ts @@ -12,4 +12,4 @@ verify.importFixAtPosition([ `import { f1 } from "ambient-module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportAmbient1.ts b/tests/cases/fourslash/importNameCodeFixNewImportAmbient1.ts index 60504c8971165..835850306f68d 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportAmbient1.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportAmbient1.ts @@ -25,4 +25,4 @@ verify.importFixAtPosition([ `import * as ns from "yet-another-ambient-module"; import { v1 } from "ambient-module"; var x = v1 + 5;` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportAmbient2.ts b/tests/cases/fourslash/importNameCodeFixNewImportAmbient2.ts index 999da4bffbbde..a23d7684d0ab5 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportAmbient2.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportAmbient2.ts @@ -18,4 +18,4 @@ verify.importFixAtPosition([ import { f1 } from "ambient-module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportAmbient3.ts b/tests/cases/fourslash/importNameCodeFixNewImportAmbient3.ts index 648293cce2ef0..dbd6c4ef26ab8 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportAmbient3.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportAmbient3.ts @@ -27,4 +27,4 @@ verify.importFixAtPosition([ `import * as ns from "yet-another-ambient-module" import { v1 } from "ambient-module"; var x = v1 + 5;` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportBaseUrl0.ts b/tests/cases/fourslash/importNameCodeFixNewImportBaseUrl0.ts index e15c2cf4399d8..a48b381df68e8 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportBaseUrl0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportBaseUrl0.ts @@ -16,4 +16,4 @@ verify.importFixAtPosition([ `import { f1 } from "b"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportDefault0.ts b/tests/cases/fourslash/importNameCodeFixNewImportDefault0.ts index 3efe023e922b9..b27cbde32830d 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportDefault0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportDefault0.ts @@ -9,4 +9,4 @@ verify.importFixAtPosition([ `import f1 from "./module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFile0.ts b/tests/cases/fourslash/importNameCodeFixNewImportFile0.ts index 2372110437a22..12566de406d02 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportFile0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportFile0.ts @@ -10,4 +10,4 @@ verify.importFixAtPosition([ `import { f1 } from "./module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFile1.ts b/tests/cases/fourslash/importNameCodeFixNewImportFile1.ts index 9f6cac0b7c14b..b98345db9f604 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportFile1.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportFile1.ts @@ -15,4 +15,4 @@ verify.importFixAtPosition([ import { f1 } from "./Module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportFile2.ts b/tests/cases/fourslash/importNameCodeFixNewImportFile2.ts index ca9330e9846a5..5d5c1fb61bcdc 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportFile2.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportFile2.ts @@ -10,4 +10,4 @@ verify.importFixAtPosition([ `import { f1 } from "../../other_dir/module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules1.ts b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules1.ts index 6bffe41b27a04..77b1545e3c0b8 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules1.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules1.ts @@ -13,4 +13,4 @@ verify.importFixAtPosition([ `import { f1 } from "fake-module/nested"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules2.ts b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules2.ts index ff48fbe182cca..80cb53d7e092d 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules2.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules2.ts @@ -22,4 +22,4 @@ verify.importFixAtPosition([ `import { f1 } from "fake-module"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules3.ts b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules3.ts index b1143cb4b41c9..f0e09885a6b19 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportNodeModules3.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportNodeModules3.ts @@ -11,4 +11,4 @@ verify.importFixAtPosition([ `import { f1 } from "random"; f1();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportPaths0.ts b/tests/cases/fourslash/importNameCodeFixNewImportPaths0.ts index 93cd6f92ef595..bd3fd9a84b3f5 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportPaths0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportPaths0.ts @@ -19,4 +19,4 @@ verify.importFixAtPosition([ `import { foo } from "a"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportPaths1.ts b/tests/cases/fourslash/importNameCodeFixNewImportPaths1.ts index bb0f1e6705a09..5ac195e9ab468 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportPaths1.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportPaths1.ts @@ -19,4 +19,4 @@ verify.importFixAtPosition([ `import { foo } from "b/f2"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts b/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts index b455538de085e..33b8d9330be71 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportPaths2.ts @@ -25,4 +25,4 @@ verify.importFixAtPosition([ `import { foo } from "b"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportRootDirs0.ts b/tests/cases/fourslash/importNameCodeFixNewImportRootDirs0.ts index ae8ef03ccaccc..8721d7e0105c9 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportRootDirs0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportRootDirs0.ts @@ -20,4 +20,4 @@ verify.importFixAtPosition([ `import { foo } from "./f2"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts b/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts index a6eb6a9075998..cb7ef465affe8 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots0.ts @@ -19,4 +19,4 @@ verify.importFixAtPosition([ `import { foo } from "random"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots1.ts b/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots1.ts index 2778f51bacfdd..1398a5d786614 100644 --- a/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots1.ts +++ b/tests/cases/fourslash/importNameCodeFixNewImportTypeRoots1.ts @@ -20,4 +20,4 @@ verify.importFixAtPosition([ `import { foo } from "random"; foo();` -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixOptionalImport0.ts b/tests/cases/fourslash/importNameCodeFixOptionalImport0.ts index 30b482a94d792..34cebad941544 100644 --- a/tests/cases/fourslash/importNameCodeFixOptionalImport0.ts +++ b/tests/cases/fourslash/importNameCodeFixOptionalImport0.ts @@ -17,4 +17,4 @@ foo();`, `import * as ns from "./foo"; ns.foo();`, -]); \ No newline at end of file +]); diff --git a/tests/cases/fourslash/importNameCodeFixOptionalImport1.ts b/tests/cases/fourslash/importNameCodeFixOptionalImport1.ts index 343b0692260c6..7a3d19e1532d9 100644 --- a/tests/cases/fourslash/importNameCodeFixOptionalImport1.ts +++ b/tests/cases/fourslash/importNameCodeFixOptionalImport1.ts @@ -17,4 +17,4 @@ foo();`, `import { foo } from "bar"; foo();`, -]); \ No newline at end of file +]);