You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/compiler/diagnosticInformationMap.generated.ts
+4Lines changed: 4 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -390,6 +390,10 @@ module ts {
390
390
Object_literal_s_property_0_implicitly_has_an_1_type: {code: 7018,category: DiagnosticCategory.Error,key: "Object literal's property '{0}' implicitly has an '{1}' type."},
391
391
Rest_parameter_0_implicitly_has_an_any_type: {code: 7019,category: DiagnosticCategory.Error,key: "Rest parameter '{0}' implicitly has an 'any[]' type."},
392
392
Call_signature_which_lacks_return_type_annotation_implicitly_has_an_any_return_type: {code: 7020,category: DiagnosticCategory.Error,key: "Call signature, which lacks return-type annotation, implicitly has an 'any' return type."},
393
+
_0_implicitly_has_type_any_because_it_is_referenced_directly_or_indirectly_in_its_own_type_annotation: {code: 7021,category: DiagnosticCategory.Error,key: "'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation."},
394
+
_0_implicitly_has_type_any_because_it_is_does_not_have_a_type_annotation_and_is_referenced_directly_or_indirectly_in_its_own_initializer: {code: 7022,category: DiagnosticCategory.Error,key: "'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer."},
395
+
_0_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: {code: 7023,category: DiagnosticCategory.Error,key: "'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."},
396
+
Function_implicitly_has_return_type_any_because_it_does_not_have_a_return_type_annotation_and_is_referenced_directly_or_indirectly_in_one_of_its_return_expressions: {code: 7024,category: DiagnosticCategory.Error,key: "Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions."},
393
397
You_cannot_rename_this_element: {code: 8000,category: DiagnosticCategory.Error,key: "You cannot rename this element."},
Copy file name to clipboardExpand all lines: src/compiler/diagnosticMessages.json
+16Lines changed: 16 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1557,6 +1557,22 @@
1557
1557
"category": "Error",
1558
1558
"code": 7020
1559
1559
},
1560
+
"'{0}' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation.": {
1561
+
"category": "Error",
1562
+
"code": 7021
1563
+
},
1564
+
"'{0}' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer.": {
1565
+
"category": "Error",
1566
+
"code": 7022
1567
+
},
1568
+
"'{0}' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": {
1569
+
"category": "Error",
1570
+
"code": 7023
1571
+
},
1572
+
"Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.": {
!!! 'a' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation.
7
+
8
+
// Error expected on b or c
9
+
var b: typeof c;
10
+
var c: typeof b;
11
+
~
12
+
!!! 'c' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation.
13
+
14
+
// Error expected
15
+
var d: Array<typeof d>;
16
+
~
17
+
!!! 'd' implicitly has type 'any' because it is referenced directly or indirectly in its own type annotation.
18
+
19
+
function f() { return f; }
20
+
21
+
// Error expected
22
+
function g() { return g(); }
23
+
~
24
+
!!! 'g' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
25
+
26
+
// Error expected
27
+
var f1 = function () {
28
+
~~~~~~~~~~~~~
29
+
return f1();
30
+
~~~~~~~~~~~~~~~~
31
+
};
32
+
~
33
+
!!! Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
34
+
35
+
// Error expected
36
+
var f2 = () => f2();
37
+
~~~~~~~~~~
38
+
!!! Function implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
39
+
40
+
// Error expected
41
+
function h() {
42
+
~
43
+
!!! 'h' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
44
+
return foo();
45
+
function foo() {
46
+
return h() || "hello";
47
+
}
48
+
}
49
+
50
+
interface A {
51
+
s: string;
52
+
}
53
+
54
+
function foo(x: A): string { return "abc"; }
55
+
56
+
class C {
57
+
// Error expected
58
+
s = foo(this);
59
+
~~~~~~~~~~~~~~
60
+
!!! 's' implicitly has type 'any' because it is does not have a type annotation and is referenced directly or indirectly in its own initializer.
61
+
}
62
+
63
+
class D {
64
+
// Error expected
65
+
get x() {
66
+
~~~~~~~~~
67
+
return this.x;
68
+
~~~~~~~~~~~~~~~~~~~~~~
69
+
}
70
+
~~~~~
71
+
!!! 'x' implicitly has return type 'any' because it does not have a return type annotation and is referenced directly or indirectly in one of its return expressions.
0 commit comments