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: tests/baselines/reference/errorForUsingPropertyOfTypeAsType01.errors.txt
+9-9Lines changed: 9 additions & 9 deletions
Original file line number
Diff line number
Diff line change
@@ -1,7 +1,7 @@
1
-
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(6,12): error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
1
+
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(6,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(22,12): error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
4
-
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(29,12): error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
3
+
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(22,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
4
+
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(29,12): error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
5
5
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts(36,12): error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
!!! error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
15
+
~~~~~~~
16
+
!!! error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
!!! error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
35
+
~~~~~~~
36
+
!!! error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
37
37
}
38
38
39
39
namespace Test4 {
40
40
export type Foo = { bar: number }
41
41
| { bar: string }
42
42
43
43
var x: Foo.bar = "";
44
-
~~~
45
-
!!! error TS2702: 'Foo' only refers to a type, but is being used as a namespace here.
44
+
~~~~~~~
45
+
!!! error TS2713: Cannot access 'Foo.bar' because 'Foo' is a type, but not a namespace. Did you mean to retrieve the type of the property 'bar' in 'Foo' with 'Foo["bar"]'?
0 commit comments