2014-09-12 22:35:07 +02:00
|
|
|
tests/cases/compiler/typeofClass.ts(8,4): error TS2339: Property 'bar' does not exist on type 'K'.
|
|
|
|
tests/cases/compiler/typeofClass.ts(10,4): error TS2339: Property 'foo' does not exist on type 'typeof K'.
|
|
|
|
|
|
|
|
|
2014-07-13 01:04:16 +02:00
|
|
|
==== tests/cases/compiler/typeofClass.ts (2 errors) ====
|
|
|
|
class K {
|
|
|
|
foo: number;
|
|
|
|
static bar: string;
|
|
|
|
}
|
|
|
|
|
|
|
|
var k1: K;
|
|
|
|
k1.foo;
|
|
|
|
k1.bar;
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'bar' does not exist on type 'K'.
|
2014-07-13 01:04:16 +02:00
|
|
|
var k2: typeof K;
|
|
|
|
k2.foo;
|
|
|
|
~~~
|
2014-09-12 00:19:57 +02:00
|
|
|
!!! error TS2339: Property 'foo' does not exist on type 'typeof K'.
|
2014-07-13 01:04:16 +02:00
|
|
|
k2.bar;
|