mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
33 lines
463 B
TypeScript
33 lines
463 B
TypeScript
//// [tests/cases/compiler/defaultIndexProps2.ts] ////
|
|
|
|
//// [defaultIndexProps2.ts]
|
|
class Foo {
|
|
public v = "Yo";
|
|
}
|
|
|
|
var f = new Foo();
|
|
|
|
// WScript.Echo(f[0]);
|
|
|
|
var o = {v:"Yo2"};
|
|
|
|
// WScript.Echo(o[0]);
|
|
|
|
1[0];
|
|
var q = "s"[0];
|
|
|
|
|
|
//// [defaultIndexProps2.js]
|
|
"use strict";
|
|
class Foo {
|
|
constructor() {
|
|
this.v = "Yo";
|
|
}
|
|
}
|
|
var f = new Foo();
|
|
// WScript.Echo(f[0]);
|
|
var o = { v: "Yo2" };
|
|
// WScript.Echo(o[0]);
|
|
1[0];
|
|
var q = "s"[0];
|