30 lines
394 B
Plaintext
30 lines
394 B
Plaintext
|
=== tests/cases/compiler/defaultIndexProps2.ts ===
|
||
|
class Foo {
|
||
|
>Foo : Foo
|
||
|
|
||
|
public v = "Yo";
|
||
|
>v : string
|
||
|
}
|
||
|
|
||
|
var f = new Foo();
|
||
|
>f : Foo
|
||
|
>new Foo() : Foo
|
||
|
>Foo : typeof Foo
|
||
|
|
||
|
// WScript.Echo(f[0]);
|
||
|
|
||
|
var o = {v:"Yo2"};
|
||
|
>o : { v: string; }
|
||
|
>{v:"Yo2"} : { v: string; }
|
||
|
>v : string
|
||
|
|
||
|
// WScript.Echo(o[0]);
|
||
|
|
||
|
1[0];
|
||
|
>1[0] : any
|
||
|
|
||
|
var q = "s"[0];
|
||
|
>q : string
|
||
|
>"s"[0] : string
|
||
|
|