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