TypeScript/tests/baselines/reference/genericFunduleInModule2.errors.txt
Zzzen 1d51dfa550
improve error message for using property of type as type (#45354)
* improve error message for using property of type as type

* suggest typeof when possible

* fix naming and error location
2021-09-03 12:17:50 -07:00

18 lines
556 B
Plaintext

tests/cases/compiler/genericFunduleInModule2.ts(11,8): error TS2749: 'A.B' refers to a value, but is being used as a type here. Did you mean 'typeof A.B'?
==== tests/cases/compiler/genericFunduleInModule2.ts (1 errors) ====
module A {
export function B<T>(x: T) { return x; }
}
module A {
export module B {
export var x = 1;
}
}
var b: A.B;
~~~
!!! error TS2749: 'A.B' refers to a value, but is being used as a type here. Did you mean 'typeof A.B'?
A.B(1);