Added test case.
This commit is contained in:
parent
89994111bd
commit
c14ff00bcf
1 changed files with 37 additions and 0 deletions
37
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts
Normal file
37
tests/cases/compiler/errorForUsingPropertyOfTypeAsType01.ts
Normal file
|
@ -0,0 +1,37 @@
|
|||
namespace Test1 {
|
||||
export interface Foo {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
var x: Foo.bar = "";
|
||||
}
|
||||
|
||||
namespace Test2 {
|
||||
export class Foo {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
var x: Foo.bar = "";
|
||||
}
|
||||
|
||||
namespace Test3 {
|
||||
export type Foo = {
|
||||
bar: string;
|
||||
}
|
||||
|
||||
var x: Foo.bar = "";
|
||||
}
|
||||
|
||||
namespace Test4 {
|
||||
export type Foo = { bar: number }
|
||||
| { bar: string }
|
||||
|
||||
var x: Foo.bar = "";
|
||||
}
|
||||
|
||||
namespace Test5 {
|
||||
export type Foo = { bar: number }
|
||||
| { wat: string }
|
||||
|
||||
var x: Foo.bar = "";
|
||||
}
|
Loading…
Reference in a new issue