Provide suggestions for common can-not-find-name errors (#27034)
This commit is contained in:
parent
1c1379252e
commit
31374d21bf
|
@ -1657,7 +1657,10 @@ namespace ts {
|
|||
}
|
||||
const symbol = resolveSymbol(resolveName(errorLocation, name, SymbolFlags.Type & ~SymbolFlags.Value, /*nameNotFoundMessage*/undefined, /*nameArg*/ undefined, /*isUse*/ false));
|
||||
if (symbol && !(symbol.flags & SymbolFlags.NamespaceModule)) {
|
||||
error(errorLocation, Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here, unescapeLeadingUnderscores(name));
|
||||
const message = (name === "Promise" || name === "Symbol")
|
||||
? Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later
|
||||
: Diagnostics._0_only_refers_to_a_type_but_is_being_used_as_a_value_here;
|
||||
error(errorLocation, message, unescapeLeadingUnderscores(name));
|
||||
return true;
|
||||
}
|
||||
}
|
||||
|
@ -2081,7 +2084,7 @@ namespace ts {
|
|||
const namespaceMeaning = SymbolFlags.Namespace | (isInJavaScriptFile(name) ? meaning & SymbolFlags.Value : 0);
|
||||
let symbol: Symbol | undefined;
|
||||
if (name.kind === SyntaxKind.Identifier) {
|
||||
const message = meaning === namespaceMeaning ? Diagnostics.Cannot_find_namespace_0 : Diagnostics.Cannot_find_name_0;
|
||||
const message = meaning === namespaceMeaning ? Diagnostics.Cannot_find_namespace_0 : getCannotFindNameDiagnosticForName(getFirstIdentifier(name).escapedText);
|
||||
const symbolFromJSPrototype = isInJavaScriptFile(name) ? resolveEntityNameFromJSSpecialAssignment(name, meaning) : undefined;
|
||||
symbol = resolveName(location || name, name.escapedText, meaning, ignoreErrors || symbolFromJSPrototype ? undefined : message, name, /*isUse*/ true);
|
||||
if (!symbol) {
|
||||
|
@ -13842,6 +13845,36 @@ namespace ts {
|
|||
|
||||
// EXPRESSION TYPE CHECKING
|
||||
|
||||
function getCannotFindNameDiagnosticForName(name: __String): DiagnosticMessage {
|
||||
switch (name) {
|
||||
case "document":
|
||||
case "console":
|
||||
return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_include_dom;
|
||||
case "$":
|
||||
return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_jQuery_Try_npm_i_types_Slashjquery;
|
||||
case "describe":
|
||||
case "suite":
|
||||
case "it":
|
||||
case "test":
|
||||
return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_a_test_runner_Try_npm_i_types_Slashjest_or_npm_i_types_Slashmocha;
|
||||
case "process":
|
||||
case "require":
|
||||
case "Buffer":
|
||||
case "module":
|
||||
return Diagnostics.Cannot_find_name_0_Do_you_need_to_install_type_definitions_for_node_Try_npm_i_types_Slashnode;
|
||||
case "Map":
|
||||
case "Set":
|
||||
case "Promise":
|
||||
case "Symbol":
|
||||
case "WeakMap":
|
||||
case "WeakSet":
|
||||
case "Iterator":
|
||||
case "AsyncIterator":
|
||||
return Diagnostics.Cannot_find_name_0_Do_you_need_to_change_your_target_library_Try_changing_the_lib_compiler_option_to_es2015_or_later;
|
||||
default: return Diagnostics.Cannot_find_name_0;
|
||||
}
|
||||
}
|
||||
|
||||
function getResolvedSymbol(node: Identifier): Symbol {
|
||||
const links = getNodeLinks(node);
|
||||
if (!links.resolvedSymbol) {
|
||||
|
@ -13850,7 +13883,7 @@ namespace ts {
|
|||
node,
|
||||
node.escapedText,
|
||||
SymbolFlags.Value | SymbolFlags.ExportValue,
|
||||
Diagnostics.Cannot_find_name_0,
|
||||
getCannotFindNameDiagnosticForName(node.escapedText),
|
||||
node,
|
||||
!isWriteOnlyAccess(node),
|
||||
/*excludeGlobals*/ false,
|
||||
|
|
|
@ -2088,6 +2088,30 @@
|
|||
"category": "Error",
|
||||
"code": 2577
|
||||
},
|
||||
"Cannot find name '{0}'. Do you need to install type definitions for node? Try `npm i @types/node`.": {
|
||||
"category": "Error",
|
||||
"code": 2580
|
||||
},
|
||||
"Cannot find name '{0}'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.": {
|
||||
"category": "Error",
|
||||
"code": 2581
|
||||
},
|
||||
"Cannot find name '{0}'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.": {
|
||||
"category": "Error",
|
||||
"code": 2582
|
||||
},
|
||||
"Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": {
|
||||
"category": "Error",
|
||||
"code": 2583
|
||||
},
|
||||
"Cannot find name '{0}'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.": {
|
||||
"category": "Error",
|
||||
"code": 2584
|
||||
},
|
||||
"'{0}' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.": {
|
||||
"category": "Error",
|
||||
"code": 2585
|
||||
},
|
||||
"JSX element attributes type '{0}' may not be a union type.": {
|
||||
"category": "Error",
|
||||
"code": 2600
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(9,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(9,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(14,15): error TS2569: Type 'StringIterator' is not an array type or a string type. Use compiler option '--downlevelIteration' to allow iterating of iterators.
|
||||
|
||||
|
||||
|
@ -13,7 +13,7 @@ tests/cases/conformance/statements/for-ofStatements/ES5For-ofTypeCheck10.ts(14,1
|
|||
}
|
||||
[Symbol.iterator]() {
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
return this;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(5,10): error TS2471: A computed property name of the form 'Symbol.iterator' must be of type 'symbol'.
|
||||
tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/Symbols/ES5SymbolProperty2.ts (2 errors) ====
|
||||
|
@ -16,4 +16,4 @@ tests/cases/conformance/Symbols/ES5SymbolProperty2.ts(10,11): error TS2693: 'Sym
|
|||
|
||||
(new M.C)[Symbol.iterator];
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
|
@ -1,14 +1,14 @@
|
|||
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(5,9): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/conformance/Symbols/ES5SymbolProperty6.ts(5,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/Symbols/ES5SymbolProperty6.ts (2 errors) ====
|
||||
class C {
|
||||
[Symbol.iterator]() { }
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
||||
|
||||
(new C)[Symbol.iterator]
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
|
@ -1,22 +1,22 @@
|
|||
tests/cases/compiler/anonymousModules.ts(1,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/anonymousModules.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/anonymousModules.ts(1,8): error TS1005: ';' expected.
|
||||
tests/cases/compiler/anonymousModules.ts(4,2): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/anonymousModules.ts(4,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/anonymousModules.ts(4,9): error TS1005: ';' expected.
|
||||
tests/cases/compiler/anonymousModules.ts(10,2): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/anonymousModules.ts(10,2): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/compiler/anonymousModules.ts (6 errors) ====
|
||||
module {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
export var foo = 1;
|
||||
|
||||
module {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
export var bar = 1;
|
||||
|
@ -26,7 +26,7 @@ tests/cases/compiler/anonymousModules.ts(10,9): error TS1005: ';' expected.
|
|||
|
||||
module {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var x = bar;
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
tests/cases/compiler/argumentsObjectIterator02_ES5.ts(2,26): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/argumentsObjectIterator02_ES5.ts(2,26): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/compiler/argumentsObjectIterator02_ES5.ts (1 errors) ====
|
||||
function doubleAndReturnAsArray(x: number, y: number, z: number): [number, number, number] {
|
||||
let blah = arguments[Symbol.iterator];
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
let result = [];
|
||||
for (let arg of blah()) {
|
||||
|
|
|
@ -1,11 +1,11 @@
|
|||
tests/cases/conformance/salsa/bug24934.js(2,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/salsa/bug24934.js(2,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
|
||||
==== tests/cases/conformance/salsa/bug24934.js (1 errors) ====
|
||||
export function abc(a, b, c) { return 5; }
|
||||
module.exports = { abc };
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
==== tests/cases/conformance/salsa/use.js (0 errors) ====
|
||||
import { abc } from './bug24934';
|
||||
abc(1, 2, 3);
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2503: Cannot find namespace 'module'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,13): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(11,19): error TS1005: ';' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,35): error TS1005: ')' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(22,39): error TS2363: The right-hand side of an arithmetic operation must be of type 'any', 'number' or an enum type.
|
||||
|
@ -21,8 +21,8 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,41): error TS
|
|||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(40,45): error TS1002: Unterminated string literal.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(41,21): error TS2304: Cannot find name 'retValue'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(46,13): error TS1005: 'try' expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2304: Cannot find name 'console'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2304: Cannot find name 'console'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(47,17): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(53,13): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(58,5): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(69,13): error TS1109: Expression expected.
|
||||
tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(72,37): error TS1127: Invalid character.
|
||||
|
@ -103,9 +103,9 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
|||
|
||||
import fs = module("fs");
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
~~~~~~
|
||||
!!! error TS2503: Cannot find namespace 'module'.
|
||||
~~~~~~
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
||||
|
@ -188,7 +188,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
|||
!!! error TS1005: 'try' expected.
|
||||
console.log(e);
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
}
|
||||
finally {
|
||||
|
||||
|
@ -196,7 +196,7 @@ tests/cases/compiler/constructorWithIncompleteTypeAnnotation.ts(261,1): error TS
|
|||
|
||||
console.log('Done');
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'console'.
|
||||
!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
|
||||
return 0;
|
||||
|
||||
|
|
|
@ -7,7 +7,7 @@ error TS2318: Cannot find global type 'Object'.
|
|||
error TS2318: Cannot find global type 'RegExp'.
|
||||
error TS2318: Cannot find global type 'String'.
|
||||
tests/cases/compiler/decoratorMetadataNoLibIsolatedModulesTypes.ts(2,6): error TS2304: Cannot find name 'Decorate'.
|
||||
tests/cases/compiler/decoratorMetadataNoLibIsolatedModulesTypes.ts(3,13): error TS2304: Cannot find name 'Map'.
|
||||
tests/cases/compiler/decoratorMetadataNoLibIsolatedModulesTypes.ts(3,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
!!! error TS2318: Cannot find global type 'Array'.
|
||||
|
@ -25,6 +25,6 @@ tests/cases/compiler/decoratorMetadataNoLibIsolatedModulesTypes.ts(3,13): error
|
|||
!!! error TS2304: Cannot find name 'Decorate'.
|
||||
member: Map<string, number>;
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'Map'.
|
||||
!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
||||
|
|
@ -0,0 +1,88 @@
|
|||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(1,1): error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(2,5): error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(3,19): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(7,1): error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(8,5): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(9,9): error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(9,21): error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(10,9): error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(12,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(13,19): error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(14,19): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(16,23): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(17,23): error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(18,23): error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(19,23): error TS2583: Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(20,19): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(21,19): error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(23,18): error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/didYouMeanSuggestionErrors.ts(24,18): error TS2583: Cannot find name 'AsyncIterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/compiler/didYouMeanSuggestionErrors.ts (19 errors) ====
|
||||
describe("my test suite", () => {
|
||||
~~~~~~~~
|
||||
!!! error TS2582: Cannot find name 'describe'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
it("should run", () => {
|
||||
~~
|
||||
!!! error TS2582: Cannot find name 'it'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
const a = $(".thing");
|
||||
~
|
||||
!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
|
||||
});
|
||||
});
|
||||
|
||||
suite("another suite", () => {
|
||||
~~~~~
|
||||
!!! error TS2582: Cannot find name 'suite'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
test("everything else", () => {
|
||||
~~~~
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
console.log(process.env);
|
||||
~~~~~~~
|
||||
!!! error TS2584: Cannot find name 'console'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
~~~~~~~
|
||||
!!! error TS2580: Cannot find name 'process'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
document.createElement("div");
|
||||
~~~~~~~~
|
||||
!!! error TS2584: Cannot find name 'document'. Do you need to change your target library? Try changing the `lib` compiler option to include 'dom'.
|
||||
|
||||
const x = require("fs");
|
||||
~~~~~~~
|
||||
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
const y = Buffer.from([]);
|
||||
~~~~~~
|
||||
!!! error TS2580: Cannot find name 'Buffer'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
const z = module.exports;
|
||||
~~~~~~
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
const a = new Map();
|
||||
~~~
|
||||
!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const b = new Set();
|
||||
~~~
|
||||
!!! error TS2583: Cannot find name 'Set'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const c = new WeakMap();
|
||||
~~~~~~~
|
||||
!!! error TS2583: Cannot find name 'WeakMap'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const d = new WeakSet();
|
||||
~~~~~~~
|
||||
!!! error TS2583: Cannot find name 'WeakSet'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const e = Symbol();
|
||||
~~~~~~
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const f = Promise.resolve(0);
|
||||
~~~~~~~
|
||||
!!! error TS2585: 'Promise' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
const i: Iterator<any> = null as any;
|
||||
~~~~~~~~
|
||||
!!! error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const j: AsyncIterator<any> = null as any;
|
||||
~~~~~~~~~~~~~
|
||||
!!! error TS2583: Cannot find name 'AsyncIterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
const k: Symbol = null as any;
|
||||
const l: Promise<any> = null as any;
|
||||
});
|
||||
});
|
55
tests/baselines/reference/didYouMeanSuggestionErrors.js
Normal file
55
tests/baselines/reference/didYouMeanSuggestionErrors.js
Normal file
|
@ -0,0 +1,55 @@
|
|||
//// [didYouMeanSuggestionErrors.ts]
|
||||
describe("my test suite", () => {
|
||||
it("should run", () => {
|
||||
const a = $(".thing");
|
||||
});
|
||||
});
|
||||
|
||||
suite("another suite", () => {
|
||||
test("everything else", () => {
|
||||
console.log(process.env);
|
||||
document.createElement("div");
|
||||
|
||||
const x = require("fs");
|
||||
const y = Buffer.from([]);
|
||||
const z = module.exports;
|
||||
|
||||
const a = new Map();
|
||||
const b = new Set();
|
||||
const c = new WeakMap();
|
||||
const d = new WeakSet();
|
||||
const e = Symbol();
|
||||
const f = Promise.resolve(0);
|
||||
|
||||
const i: Iterator<any> = null as any;
|
||||
const j: AsyncIterator<any> = null as any;
|
||||
const k: Symbol = null as any;
|
||||
const l: Promise<any> = null as any;
|
||||
});
|
||||
});
|
||||
|
||||
//// [didYouMeanSuggestionErrors.js]
|
||||
describe("my test suite", function () {
|
||||
it("should run", function () {
|
||||
var a = $(".thing");
|
||||
});
|
||||
});
|
||||
suite("another suite", function () {
|
||||
test("everything else", function () {
|
||||
console.log(process.env);
|
||||
document.createElement("div");
|
||||
var x = require("fs");
|
||||
var y = Buffer.from([]);
|
||||
var z = module.exports;
|
||||
var a = new Map();
|
||||
var b = new Set();
|
||||
var c = new WeakMap();
|
||||
var d = new WeakSet();
|
||||
var e = Symbol();
|
||||
var f = Promise.resolve(0);
|
||||
var i = null;
|
||||
var j = null;
|
||||
var k = null;
|
||||
var l = null;
|
||||
});
|
||||
});
|
57
tests/baselines/reference/didYouMeanSuggestionErrors.symbols
Normal file
57
tests/baselines/reference/didYouMeanSuggestionErrors.symbols
Normal file
|
@ -0,0 +1,57 @@
|
|||
=== tests/cases/compiler/didYouMeanSuggestionErrors.ts ===
|
||||
describe("my test suite", () => {
|
||||
it("should run", () => {
|
||||
const a = $(".thing");
|
||||
>a : Symbol(a, Decl(didYouMeanSuggestionErrors.ts, 2, 13))
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
suite("another suite", () => {
|
||||
test("everything else", () => {
|
||||
console.log(process.env);
|
||||
document.createElement("div");
|
||||
|
||||
const x = require("fs");
|
||||
>x : Symbol(x, Decl(didYouMeanSuggestionErrors.ts, 11, 13))
|
||||
|
||||
const y = Buffer.from([]);
|
||||
>y : Symbol(y, Decl(didYouMeanSuggestionErrors.ts, 12, 13))
|
||||
|
||||
const z = module.exports;
|
||||
>z : Symbol(z, Decl(didYouMeanSuggestionErrors.ts, 13, 13))
|
||||
|
||||
const a = new Map();
|
||||
>a : Symbol(a, Decl(didYouMeanSuggestionErrors.ts, 15, 13))
|
||||
|
||||
const b = new Set();
|
||||
>b : Symbol(b, Decl(didYouMeanSuggestionErrors.ts, 16, 13))
|
||||
|
||||
const c = new WeakMap();
|
||||
>c : Symbol(c, Decl(didYouMeanSuggestionErrors.ts, 17, 13))
|
||||
|
||||
const d = new WeakSet();
|
||||
>d : Symbol(d, Decl(didYouMeanSuggestionErrors.ts, 18, 13))
|
||||
|
||||
const e = Symbol();
|
||||
>e : Symbol(e, Decl(didYouMeanSuggestionErrors.ts, 19, 13))
|
||||
|
||||
const f = Promise.resolve(0);
|
||||
>f : Symbol(f, Decl(didYouMeanSuggestionErrors.ts, 20, 13))
|
||||
|
||||
const i: Iterator<any> = null as any;
|
||||
>i : Symbol(i, Decl(didYouMeanSuggestionErrors.ts, 22, 13))
|
||||
|
||||
const j: AsyncIterator<any> = null as any;
|
||||
>j : Symbol(j, Decl(didYouMeanSuggestionErrors.ts, 23, 13))
|
||||
|
||||
const k: Symbol = null as any;
|
||||
>k : Symbol(k, Decl(didYouMeanSuggestionErrors.ts, 24, 13))
|
||||
>Symbol : Symbol(Symbol, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
const l: Promise<any> = null as any;
|
||||
>l : Symbol(l, Decl(didYouMeanSuggestionErrors.ts, 25, 13))
|
||||
>Promise : Symbol(Promise, Decl(lib.es5.d.ts, --, --))
|
||||
|
||||
});
|
||||
});
|
125
tests/baselines/reference/didYouMeanSuggestionErrors.types
Normal file
125
tests/baselines/reference/didYouMeanSuggestionErrors.types
Normal file
|
@ -0,0 +1,125 @@
|
|||
=== tests/cases/compiler/didYouMeanSuggestionErrors.ts ===
|
||||
describe("my test suite", () => {
|
||||
>describe("my test suite", () => { it("should run", () => { const a = $(".thing"); });}) : any
|
||||
>describe : any
|
||||
>"my test suite" : "my test suite"
|
||||
>() => { it("should run", () => { const a = $(".thing"); });} : () => void
|
||||
|
||||
it("should run", () => {
|
||||
>it("should run", () => { const a = $(".thing"); }) : any
|
||||
>it : any
|
||||
>"should run" : "should run"
|
||||
>() => { const a = $(".thing"); } : () => void
|
||||
|
||||
const a = $(".thing");
|
||||
>a : any
|
||||
>$(".thing") : any
|
||||
>$ : any
|
||||
>".thing" : ".thing"
|
||||
|
||||
});
|
||||
});
|
||||
|
||||
suite("another suite", () => {
|
||||
>suite("another suite", () => { test("everything else", () => { console.log(process.env); document.createElement("div"); const x = require("fs"); const y = Buffer.from([]); const z = module.exports; const a = new Map(); const b = new Set(); const c = new WeakMap(); const d = new WeakSet(); const e = Symbol(); const f = Promise.resolve(0); const i: Iterator<any> = null as any; const j: AsyncIterator<any> = null as any; const k: Symbol = null as any; const l: Promise<any> = null as any; });}) : any
|
||||
>suite : any
|
||||
>"another suite" : "another suite"
|
||||
>() => { test("everything else", () => { console.log(process.env); document.createElement("div"); const x = require("fs"); const y = Buffer.from([]); const z = module.exports; const a = new Map(); const b = new Set(); const c = new WeakMap(); const d = new WeakSet(); const e = Symbol(); const f = Promise.resolve(0); const i: Iterator<any> = null as any; const j: AsyncIterator<any> = null as any; const k: Symbol = null as any; const l: Promise<any> = null as any; });} : () => void
|
||||
|
||||
test("everything else", () => {
|
||||
>test("everything else", () => { console.log(process.env); document.createElement("div"); const x = require("fs"); const y = Buffer.from([]); const z = module.exports; const a = new Map(); const b = new Set(); const c = new WeakMap(); const d = new WeakSet(); const e = Symbol(); const f = Promise.resolve(0); const i: Iterator<any> = null as any; const j: AsyncIterator<any> = null as any; const k: Symbol = null as any; const l: Promise<any> = null as any; }) : any
|
||||
>test : any
|
||||
>"everything else" : "everything else"
|
||||
>() => { console.log(process.env); document.createElement("div"); const x = require("fs"); const y = Buffer.from([]); const z = module.exports; const a = new Map(); const b = new Set(); const c = new WeakMap(); const d = new WeakSet(); const e = Symbol(); const f = Promise.resolve(0); const i: Iterator<any> = null as any; const j: AsyncIterator<any> = null as any; const k: Symbol = null as any; const l: Promise<any> = null as any; } : () => void
|
||||
|
||||
console.log(process.env);
|
||||
>console.log(process.env) : any
|
||||
>console.log : any
|
||||
>console : any
|
||||
>log : any
|
||||
>process.env : any
|
||||
>process : any
|
||||
>env : any
|
||||
|
||||
document.createElement("div");
|
||||
>document.createElement("div") : any
|
||||
>document.createElement : any
|
||||
>document : any
|
||||
>createElement : any
|
||||
>"div" : "div"
|
||||
|
||||
const x = require("fs");
|
||||
>x : any
|
||||
>require("fs") : any
|
||||
>require : any
|
||||
>"fs" : "fs"
|
||||
|
||||
const y = Buffer.from([]);
|
||||
>y : any
|
||||
>Buffer.from([]) : any
|
||||
>Buffer.from : any
|
||||
>Buffer : any
|
||||
>from : any
|
||||
>[] : undefined[]
|
||||
|
||||
const z = module.exports;
|
||||
>z : any
|
||||
>module.exports : any
|
||||
>module : any
|
||||
>exports : any
|
||||
|
||||
const a = new Map();
|
||||
>a : any
|
||||
>new Map() : any
|
||||
>Map : any
|
||||
|
||||
const b = new Set();
|
||||
>b : any
|
||||
>new Set() : any
|
||||
>Set : any
|
||||
|
||||
const c = new WeakMap();
|
||||
>c : any
|
||||
>new WeakMap() : any
|
||||
>WeakMap : any
|
||||
|
||||
const d = new WeakSet();
|
||||
>d : any
|
||||
>new WeakSet() : any
|
||||
>WeakSet : any
|
||||
|
||||
const e = Symbol();
|
||||
>e : any
|
||||
>Symbol() : any
|
||||
>Symbol : any
|
||||
|
||||
const f = Promise.resolve(0);
|
||||
>f : any
|
||||
>Promise.resolve(0) : any
|
||||
>Promise.resolve : any
|
||||
>Promise : any
|
||||
>resolve : any
|
||||
>0 : 0
|
||||
|
||||
const i: Iterator<any> = null as any;
|
||||
>i : any
|
||||
>null as any : any
|
||||
>null : null
|
||||
|
||||
const j: AsyncIterator<any> = null as any;
|
||||
>j : any
|
||||
>null as any : any
|
||||
>null : null
|
||||
|
||||
const k: Symbol = null as any;
|
||||
>k : Symbol
|
||||
>null as any : any
|
||||
>null : null
|
||||
|
||||
const l: Promise<any> = null as any;
|
||||
>l : Promise<any>
|
||||
>null as any : any
|
||||
>null : null
|
||||
|
||||
});
|
||||
});
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/externModule.ts(1,1): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/compiler/externModule.ts(1,9): error TS1005: ';' expected.
|
||||
tests/cases/compiler/externModule.ts(1,9): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/externModule.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/externModule.ts(1,16): error TS1005: ';' expected.
|
||||
tests/cases/compiler/externModule.ts(3,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
tests/cases/compiler/externModule.ts(4,10): error TS2391: Function implementation is missing or not immediately following the declaration.
|
||||
|
@ -21,7 +21,7 @@ tests/cases/compiler/externModule.ts(37,3): error TS2552: Cannot find name 'XDat
|
|||
~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
export class XDate {
|
||||
|
|
|
@ -50,9 +50,9 @@ tests/cases/conformance/fixSignatureCaching.ts(915,36): error TS2339: Property '
|
|||
tests/cases/conformance/fixSignatureCaching.ts(915,53): error TS2339: Property 'mobileDetectRules' does not exist on type '{}'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(955,42): error TS2339: Property 'mobileGrade' does not exist on type '{}'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(964,57): error TS2339: Property 'getDeviceSmallerSide' does not exist on type '{}'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(978,16): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(978,42): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(979,37): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(978,16): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(978,42): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(979,37): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(980,23): error TS2304: Cannot find name 'define'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(980,48): error TS2304: Cannot find name 'define'.
|
||||
tests/cases/conformance/fixSignatureCaching.ts(981,16): error TS2304: Cannot find name 'define'.
|
||||
|
@ -1143,12 +1143,12 @@ tests/cases/conformance/fixSignatureCaching.ts(983,44): error TS2339: Property '
|
|||
})((function (undefined) {
|
||||
if (typeof module !== 'undefined' && module.exports) {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
return function (factory) { module.exports = factory(); };
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
} else if (typeof define === 'function' && define.amd) {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'define'.
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/innerModExport1.ts(5,5): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/innerModExport1.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/innerModExport1.ts(5,12): error TS1005: ';' expected.
|
||||
|
||||
|
||||
|
@ -9,7 +9,7 @@ tests/cases/compiler/innerModExport1.ts(5,12): error TS1005: ';' expected.
|
|||
var non_export_var: number;
|
||||
module {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var non_export_var = 0;
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/innerModExport2.ts(5,5): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/innerModExport2.ts(5,5): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/innerModExport2.ts(5,12): error TS1005: ';' expected.
|
||||
tests/cases/compiler/innerModExport2.ts(7,20): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local.
|
||||
tests/cases/compiler/innerModExport2.ts(13,9): error TS2395: Individual declarations in merged declaration 'export_var' must be all exported or all local.
|
||||
|
@ -12,7 +12,7 @@ tests/cases/compiler/innerModExport2.ts(20,7): error TS2339: Property 'NonExport
|
|||
var non_export_var: number;
|
||||
module {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
var non_export_var = 0;
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,6): error TS17008: JSX element 'any' has no corresponding closing tag.
|
||||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,13): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,13): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(6,17): error TS1005: '}' expected.
|
||||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(8,6): error TS17008: JSX element 'any' has no corresponding closing tag.
|
||||
tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(10,6): error TS17008: JSX element 'foo' has no corresponding closing tag.
|
||||
|
@ -24,7 +24,7 @@ tests/cases/conformance/jsx/jsxAndTypeAssertion.tsx(21,1): error TS1005: '</' ex
|
|||
~~~
|
||||
!!! error TS17008: JSX element 'any' has no corresponding closing tag.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
~
|
||||
!!! error TS1005: '}' expected.
|
||||
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/metadataImportType.ts(2,6): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/compiler/metadataImportType.ts(2,6): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find module './b'.
|
||||
|
||||
|
||||
|
@ -6,7 +6,7 @@ tests/cases/compiler/metadataImportType.ts(3,15): error TS2307: Cannot find modu
|
|||
export class A {
|
||||
@test
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
b: import('./b').B
|
||||
~~~~~
|
||||
!!! error TS2307: Cannot find module './b'.
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
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(10,13): error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
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 TS2551: Property 'sign' does not exist on type 'Math'. Did you mean 'sin'?
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(25,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(29,18): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(33,13): error TS2304: Cannot find name 'Proxy'.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(36,1): error TS2304: Cannot find name 'Reflect'.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(40,5): error TS2339: Property 'flags' does not exist on type 'RegExp'.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(44,5): error TS2339: Property 'includes' does not exist on type 'string'.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(47,9): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts(51,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.ts (12 errors) ====
|
||||
|
@ -26,7 +26,7 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t
|
|||
// Using ES6 collection
|
||||
var m = new Map<string, number>();
|
||||
~~~
|
||||
!!! error TS2304: Cannot find name 'Map'.
|
||||
!!! error TS2583: Cannot find name 'Map'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
m.clear();
|
||||
// Using ES6 iterable
|
||||
m.keys();
|
||||
|
@ -48,13 +48,13 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t
|
|||
a: 2,
|
||||
[Symbol.hasInstance](value: any) {
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
return false;
|
||||
}
|
||||
};
|
||||
o.hasOwnProperty(Symbol.hasInstance);
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
// Using Es6 proxy
|
||||
var t = {}
|
||||
|
@ -82,13 +82,13 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingES6FeaturesWithOnlyES5Lib.t
|
|||
// Using ES6 symbol
|
||||
var s = Symbol();
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
// Using ES6 wellknown-symbol
|
||||
const o1 = {
|
||||
[Symbol.hasInstance](value: any) {
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
return false;
|
||||
}
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.ts(7,1): error TS2322: Type 'false' is not assignable to type 'string'.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.ts(7,3): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.ts(7,3): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6WellknownSymbolLib.ts (2 errors) ====
|
||||
|
@ -13,4 +13,4 @@ tests/cases/compiler/modularizeLibrary_ErrorFromUsingWellknownSymbolWithOutES6We
|
|||
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
|
||||
!!! error TS2322: Type 'false' is not assignable to type 'string'.
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/compiler/moduleExports1.ts(13,6): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/moduleExports1.ts(13,22): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/moduleExports1.ts(13,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/moduleExports1.ts(13,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
|
||||
==== tests/cases/compiler/moduleExports1.ts (2 errors) ====
|
||||
|
@ -17,6 +17,6 @@ tests/cases/compiler/moduleExports1.ts(13,22): error TS2304: Cannot find name 'm
|
|||
|
||||
if (!module.exports) module.exports = "";
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/compiler/moduleKeywordRepeatError.ts(3,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/moduleKeywordRepeatError.ts(3,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expected.
|
||||
|
||||
|
||||
|
@ -7,6 +7,6 @@ tests/cases/compiler/moduleKeywordRepeatError.ts(3,15): error TS1005: ';' expect
|
|||
|
||||
module.module { }
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/jsdoc/bug26693.js(1,15): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/jsdoc/bug26693.js(1,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/jsdoc/bug26693.js(1,21): error TS1005: '}' expected.
|
||||
tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find module 'nope'.
|
||||
|
||||
|
@ -6,7 +6,7 @@ tests/cases/conformance/jsdoc/bug26693.js(2,22): error TS2307: Cannot find modul
|
|||
==== tests/cases/conformance/jsdoc/bug26693.js (3 errors) ====
|
||||
/** @typedef {module:locale} hi */
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: '}' expected.
|
||||
import { nope } from 'nope';
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(1,14): error TS1005: '(' expected.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(2,3): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(2,10): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(2,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,3): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,10): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(3,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
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 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,10): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
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 TS2693: 'any' only refers to a type, but is being used as a value here.
|
||||
|
@ -22,12 +22,12 @@ tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS100
|
|||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
static test(name:string)
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'name'.
|
||||
~
|
||||
|
@ -38,7 +38,7 @@ tests/cases/compiler/overloadingStaticFunctionsInFunctions.ts(4,25): error TS100
|
|||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'name'.
|
||||
~
|
||||
|
|
|
@ -1,15 +1,15 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(2,14): error TS2304: Cannot find name 'require'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(3,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(2,14): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts(3,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509534.ts (2 errors) ====
|
||||
"use strict";
|
||||
var config = require("../config");
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'require'.
|
||||
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
module.exports.route = function (server) {
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
// General Login Page
|
||||
server.get(config.env.siteRoot + "/auth/login", function (req, res, next) {
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,6): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,22): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,6): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts(1,22): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser509693.ts (2 errors) ====
|
||||
if (!module.exports) module.exports = "";
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
|
@ -1,14 +1,14 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,15): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,15): error TS2503: Cannot find namespace 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,15): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts(1,21): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser519458.ts (3 errors) ====
|
||||
import rect = module("rect"); var bar = new rect.Rect();
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
~~~~~~
|
||||
!!! error TS2503: Cannot find namespace 'module'.
|
||||
~~~~~~
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser521128.ts(1,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser521128.ts(1,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RegressionTests/parser521128.ts(1,15): error TS1005: ';' expected.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/RegressionTests/parser521128.ts (2 errors) ====
|
||||
module.module { }
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
|
@ -1,8 +1,8 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList2.ts(1,9): error TS2304: Cannot find name '$'.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList2.ts(1,9): error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserCommaInTypeMemberList2.ts (1 errors) ====
|
||||
var s = $.extend< { workItem: any }, { workItem: any, width: string }>({ workItem: this._workItem }, {});
|
||||
~
|
||||
!!! error TS2304: Cannot find name '$'.
|
||||
!!! error TS2581: Cannot find name '$'. Do you need to install type definitions for jQuery? Try `npm i @types/jquery`.
|
||||
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty1.ts (1 errors) ====
|
||||
interface I {
|
||||
[Symbol.iterator]: string;
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty2.ts (1 errors) ====
|
||||
interface I {
|
||||
[Symbol.unscopables](): string;
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty3.ts (1 errors) ====
|
||||
declare class C {
|
||||
[Symbol.unscopables](): string;
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty4.ts (1 errors) ====
|
||||
declare class C {
|
||||
[Symbol.isRegExp]: string;
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty5.ts (1 errors) ====
|
||||
class C {
|
||||
[Symbol.isRegExp]: string;
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty6.ts (1 errors) ====
|
||||
class C {
|
||||
[Symbol.toStringTag]: string = "";
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty7.ts (1 errors) ====
|
||||
class C {
|
||||
[Symbol.toStringTag](): void { }
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty8.ts (1 errors) ====
|
||||
var x: {
|
||||
[Symbol.toPrimitive](): string
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,9 +1,9 @@
|
|||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts(2,6): error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts(2,6): error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
|
||||
|
||||
==== tests/cases/conformance/parser/ecmascript5/Symbols/parserES5SymbolProperty9.ts (1 errors) ====
|
||||
var x: {
|
||||
[Symbol.toPrimitive]: string
|
||||
~~~~~~
|
||||
!!! error TS2693: 'Symbol' only refers to a type, but is being used as a value here.
|
||||
!!! error TS2585: 'Symbol' only refers to a type, but is being used as a value here. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
}
|
|
@ -1,4 +1,4 @@
|
|||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts(2,19): error TS2304: Cannot find name 'Iterator'.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts(2,19): error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts(2,28): error TS2304: Cannot find name 'T'.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts(2,42): error TS2304: Cannot find name 'Query'.
|
||||
tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpenBrace1.ts(2,48): error TS2304: Cannot find name 'T'.
|
||||
|
@ -11,7 +11,7 @@ tests/cases/conformance/parser/ecmascript5/ErrorRecovery/parserMissingLambdaOpen
|
|||
class C {
|
||||
where(filter: Iterator<T, boolean>): Query<T> {
|
||||
~~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'Iterator'.
|
||||
!!! error TS2583: Cannot find name 'Iterator'. Do you need to change your target library? Try changing the `lib` compiler option to es2015 or later.
|
||||
~
|
||||
!!! error TS2304: Cannot find name 'T'.
|
||||
~~~~~
|
||||
|
|
|
@ -5,8 +5,8 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(19,21): er
|
|||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(21,29): error TS2694: Namespace 'Harness' has no exported member 'Assert'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(25,17): error TS2304: Cannot find name 'IIO'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(41,12): error TS2304: Cannot find name 'ActiveXObject'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2304: Cannot find name 'require'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(44,14): error TS2304: Cannot find name 'require'.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(43,19): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(44,14): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(341,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'?
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(347,13): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'?
|
||||
tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(351,17): error TS2662: Cannot find name 'errorHandlerStack'. Did you mean the static member 'Runnable.errorHandlerStack'?
|
||||
|
@ -169,10 +169,10 @@ tests/cases/conformance/parser/ecmascript5/RealWorld/parserharness.ts(2030,32):
|
|||
eval(typescriptServiceFile);
|
||||
} else if (typeof require === "function") {
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'require'.
|
||||
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
var vm = require('vm');
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'require'.
|
||||
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
vm.runInThisContext(typescriptServiceFile, 'typescriptServices.js');
|
||||
} else {
|
||||
throw new Error('Unknown context');
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
tests/cases/compiler/reservedWords2.ts(1,8): error TS1109: Expression expected.
|
||||
tests/cases/compiler/reservedWords2.ts(1,14): error TS1005: '(' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(1,16): error TS2304: Cannot find name 'require'.
|
||||
tests/cases/compiler/reservedWords2.ts(1,16): error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/reservedWords2.ts(1,31): error TS1005: ')' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(2,12): error TS2300: Duplicate identifier '(Missing)'.
|
||||
tests/cases/compiler/reservedWords2.ts(2,12): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
||||
|
@ -14,7 +14,7 @@ tests/cases/compiler/reservedWords2.ts(5,9): error TS2300: Duplicate identifier
|
|||
tests/cases/compiler/reservedWords2.ts(5,9): error TS2567: Enum declarations can only merge with namespace or other enum declarations.
|
||||
tests/cases/compiler/reservedWords2.ts(5,10): error TS1003: Identifier expected.
|
||||
tests/cases/compiler/reservedWords2.ts(5,18): error TS1005: '=>' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(6,1): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/reservedWords2.ts(6,1): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/reservedWords2.ts(6,8): error TS1005: ';' expected.
|
||||
tests/cases/compiler/reservedWords2.ts(7,11): error TS2300: Duplicate identifier '(Missing)'.
|
||||
tests/cases/compiler/reservedWords2.ts(7,11): error TS1005: ':' expected.
|
||||
|
@ -39,7 +39,7 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected.
|
|||
~
|
||||
!!! error TS1005: '(' expected.
|
||||
~~~~~~~
|
||||
!!! error TS2304: Cannot find name 'require'.
|
||||
!!! error TS2580: Cannot find name 'require'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ')' expected.
|
||||
import * as while from "foo"
|
||||
|
@ -72,7 +72,7 @@ tests/cases/compiler/reservedWords2.ts(10,6): error TS1003: Identifier expected.
|
|||
!!! error TS1005: '=>' expected.
|
||||
module void {}
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
var {while, return} = { while: 1, return: 2 };
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
tests/cases/compiler/staticsInAFunction.ts(1,13): error TS1005: '(' expected.
|
||||
tests/cases/compiler/staticsInAFunction.ts(2,4): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/staticsInAFunction.ts(2,11): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/compiler/staticsInAFunction.ts(2,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
tests/cases/compiler/staticsInAFunction.ts(3,4): error TS1128: Declaration or statement expected.
|
||||
tests/cases/compiler/staticsInAFunction.ts(3,11): error TS2304: Cannot find name 'test'.
|
||||
tests/cases/compiler/staticsInAFunction.ts(3,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
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 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,11): error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
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 TS2693: 'any' only refers to a type, but is being used as a value here.
|
||||
|
@ -22,12 +22,12 @@ tests/cases/compiler/staticsInAFunction.ts(4,26): error TS1005: ';' expected.
|
|||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
static test(name:string)
|
||||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'name'.
|
||||
~
|
||||
|
@ -38,7 +38,7 @@ tests/cases/compiler/staticsInAFunction.ts(4,26): error TS1005: ';' expected.
|
|||
~~~~~~
|
||||
!!! error TS1128: Declaration or statement expected.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'test'.
|
||||
!!! error TS2582: Cannot find name 'test'. Do you need to install type definitions for a test runner? Try `npm i @types/jest` or `npm i @types/mocha`.
|
||||
~~~~
|
||||
!!! error TS2304: Cannot find name 'name'.
|
||||
~
|
||||
|
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,1): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,9): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,9): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(1,21): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,1): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,9): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,9): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,24): error TS1005: ';' expected.
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,24): error
|
|||
~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ tests/cases/conformance/es6/templates/templateStringInModuleName.ts(4,24): error
|
|||
~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
|
@ -1,10 +1,10 @@
|
|||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,1): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,9): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,9): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(1,21): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,1): error TS2304: Cannot find name 'declare'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,9): error TS1005: ';' expected.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,9): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,9): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,24): error TS1005: ';' expected.
|
||||
|
||||
|
||||
|
@ -15,7 +15,7 @@ tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,24): er
|
|||
~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
||||
|
@ -26,7 +26,7 @@ tests/cases/conformance/es6/templates/templateStringInModuleNameES6.ts(4,24): er
|
|||
~~~~~~
|
||||
!!! error TS1005: ';' expected.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~
|
||||
!!! error TS1005: ';' expected.
|
||||
}
|
|
@ -1,5 +1,5 @@
|
|||
tests/cases/compiler/typecheckIfCondition.ts(4,10): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/typecheckIfCondition.ts(4,26): error TS2304: Cannot find name 'module'.
|
||||
tests/cases/compiler/typecheckIfCondition.ts(4,10): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
tests/cases/compiler/typecheckIfCondition.ts(4,26): error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
|
||||
|
||||
==== tests/cases/compiler/typecheckIfCondition.ts (2 errors) ====
|
||||
|
@ -8,9 +8,9 @@ tests/cases/compiler/typecheckIfCondition.ts(4,26): error TS2304: Cannot find na
|
|||
{
|
||||
if (!module.exports) module.exports = "";
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
~~~~~~
|
||||
!!! error TS2304: Cannot find name 'module'.
|
||||
!!! error TS2580: Cannot find name 'module'. Do you need to install type definitions for node? Try `npm i @types/node`.
|
||||
var x = null; // don't want to baseline output
|
||||
}
|
||||
|
29
tests/cases/compiler/didYouMeanSuggestionErrors.ts
Normal file
29
tests/cases/compiler/didYouMeanSuggestionErrors.ts
Normal file
|
@ -0,0 +1,29 @@
|
|||
// @lib: es5
|
||||
describe("my test suite", () => {
|
||||
it("should run", () => {
|
||||
const a = $(".thing");
|
||||
});
|
||||
});
|
||||
|
||||
suite("another suite", () => {
|
||||
test("everything else", () => {
|
||||
console.log(process.env);
|
||||
document.createElement("div");
|
||||
|
||||
const x = require("fs");
|
||||
const y = Buffer.from([]);
|
||||
const z = module.exports;
|
||||
|
||||
const a = new Map();
|
||||
const b = new Set();
|
||||
const c = new WeakMap();
|
||||
const d = new WeakSet();
|
||||
const e = Symbol();
|
||||
const f = Promise.resolve(0);
|
||||
|
||||
const i: Iterator<any> = null as any;
|
||||
const j: AsyncIterator<any> = null as any;
|
||||
const k: Symbol = null as any;
|
||||
const l: Promise<any> = null as any;
|
||||
});
|
||||
});
|
Loading…
Reference in a new issue