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
isolatedDeclarationErrorsClasses.ts(12,17): error TS9009: At least one accessor must have an explicit type annotation with --isolatedDeclarations.
10
10
isolatedDeclarationErrorsClasses.ts(36,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
11
11
isolatedDeclarationErrorsClasses.ts(36,6): error TS2304: Cannot find name 'missing'.
12
+
isolatedDeclarationErrorsClasses.ts(36,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
12
13
isolatedDeclarationErrorsClasses.ts(38,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
14
+
isolatedDeclarationErrorsClasses.ts(38,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
13
15
isolatedDeclarationErrorsClasses.ts(40,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
16
+
isolatedDeclarationErrorsClasses.ts(40,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
14
17
isolatedDeclarationErrorsClasses.ts(42,5): error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations.
15
18
isolatedDeclarationErrorsClasses.ts(42,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
19
+
isolatedDeclarationErrorsClasses.ts(42,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
16
20
isolatedDeclarationErrorsClasses.ts(44,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
21
+
isolatedDeclarationErrorsClasses.ts(44,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
17
22
isolatedDeclarationErrorsClasses.ts(44,35): error TS7006: Parameter 'v' implicitly has an 'any' type.
18
23
isolatedDeclarationErrorsClasses.ts(44,35): error TS9011: Parameter must have an explicit type annotation with --isolatedDeclarations.
19
24
isolatedDeclarationErrorsClasses.ts(46,9): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
25
+
isolatedDeclarationErrorsClasses.ts(46,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
20
26
isolatedDeclarationErrorsClasses.ts(48,9): error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation.
21
27
isolatedDeclarationErrorsClasses.ts(48,9): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
28
+
isolatedDeclarationErrorsClasses.ts(48,10): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
22
29
isolatedDeclarationErrorsClasses.ts(48,39): error TS7006: Parameter 'value' implicitly has an 'any' type.
23
30
isolatedDeclarationErrorsClasses.ts(50,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
24
31
isolatedDeclarationErrorsClasses.ts(50,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
25
32
isolatedDeclarationErrorsClasses.ts(56,5): error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type.
26
33
isolatedDeclarationErrorsClasses.ts(56,5): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
34
+
isolatedDeclarationErrorsClasses.ts(62,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
35
+
isolatedDeclarationErrorsClasses.ts(62,14): error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations.
@@ -91,25 +100,37 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS9013: Expression type can't b
91
100
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
92
101
~~~~~~~
93
102
!!! error TS2304: Cannot find name 'missing'.
103
+
~~~~~~~
104
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
105
+
!!! related TS9029 isolatedDeclarationErrorsClasses.ts:36:5: Add a type annotation to the property [missing].
106
+
!!! related TS9035 isolatedDeclarationErrorsClasses.ts:36:6: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.
94
107
95
108
[noAnnotationLiteralName](): void { }
96
109
~~~~~~~~~~~~~~~~~~~~~~~~~
97
110
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
111
+
~~~~~~~~~~~~~~~~~~~~~~~
112
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
117
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
118
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
102
119
103
120
[noAnnotationStringName]() { }
104
121
~~~~~~~~~~~~~~~~~~~~~~~~
105
122
!!! error TS9008: Method must have an explicit return type annotation with --isolatedDeclarations.
106
123
!!! related TS9034 isolatedDeclarationErrorsClasses.ts:42:5: Add a return type to the method
107
124
~~~~~~~~~~~~~~~~~~~~~~~~
108
125
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
126
+
~~~~~~~~~~~~~~~~~~~~~~
127
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
109
128
110
129
[noParamAnnotationStringName](v): void { }
111
130
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
112
131
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
132
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
133
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
113
134
~
114
135
!!! error TS7006: Parameter 'v' implicitly has an 'any' type.
115
136
~
@@ -119,12 +140,16 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS9013: Expression type can't b
119
140
get [noAnnotationStringName]() { return 0;}
120
141
~~~~~~~~~~~~~~~~~~~~~~~~
121
142
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
143
+
~~~~~~~~~~~~~~~~~~~~~~
144
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
122
145
123
146
set [noParamAnnotationStringName](value) { }
124
147
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
148
!!! error TS7032: Property '[noParamAnnotationStringName]' implicitly has type 'any', because its set accessor lacks a parameter type annotation.
126
149
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
127
150
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
151
+
~~~~~~~~~~~~~~~~~~~~~~~~~~~
152
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
128
153
~~~~~
129
154
!!! error TS7006: Parameter 'value' implicitly has an 'any' type.
130
155
@@ -143,4 +168,18 @@ isolatedDeclarationErrorsClasses.ts(56,5): error TS9013: Expression type can't b
143
168
!!! error TS7010: '[noAnnotationLiteralName]', which lacks return-type annotation, implicitly has an 'any' return type.
144
169
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
145
170
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
171
+
}
172
+
173
+
export const prop: unique symbol = Symbol();
174
+
175
+
export class MyClass {
176
+
[prop] = () => Math.random();
177
+
~~~~
178
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
179
+
!!! related TS9029 isolatedDeclarationErrorsClasses.ts:62:5: Add a type annotation to the property [prop].
180
+
!!! related TS9035 isolatedDeclarationErrorsClasses.ts:62:6: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.
181
+
~~~~~~~~~~~~~~~~~~~
182
+
!!! error TS9007: Function must have an explicit return type annotation with --isolatedDeclarations.
183
+
!!! related TS9029 isolatedDeclarationErrorsClasses.ts:62:5: Add a type annotation to the property [prop].
184
+
!!! related TS9030 isolatedDeclarationErrorsClasses.ts:62:14: Add a return type to the function expression.
Copy file name to clipboardExpand all lines: tests/baselines/reference/isolatedDeclarationLazySymbols.errors.txt
+6-1Lines changed: 6 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -2,11 +2,12 @@ isolatedDeclarationLazySymbols.ts(1,17): error TS9007: Function must have an exp
2
2
isolatedDeclarationLazySymbols.ts(13,1): error TS9023: Assigning properties to functions without declaring them is not supported with --isolatedDeclarations. Add an explicit declaration for the properties assigned to this function.
3
3
isolatedDeclarationLazySymbols.ts(16,5): error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
4
4
isolatedDeclarationLazySymbols.ts(16,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
5
+
isolatedDeclarationLazySymbols.ts(16,6): error TS9013: Expression type can't be inferred with --isolatedDeclarations.
5
6
isolatedDeclarationLazySymbols.ts(21,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
6
7
isolatedDeclarationLazySymbols.ts(22,5): error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
!!! error TS1166: A computed property name in a class property declaration must have a simple literal type or a 'unique symbol' type.
33
34
~~~~~~~~~~~~~~~~~
34
35
!!! error TS9038: Computed property names on class or object literals cannot be inferred with --isolatedDeclarations.
36
+
~~~~~~~~~~~~~~~
37
+
!!! error TS9013: Expression type can't be inferred with --isolatedDeclarations.
38
+
!!! related TS9029 isolatedDeclarationLazySymbols.ts:16:5: Add a type annotation to the property [o["prop.inner"]].
39
+
!!! related TS9035 isolatedDeclarationLazySymbols.ts:16:6: Add satisfies and a type assertion to this expression (satisfies T as T) to make the type explicit.
0 commit comments