mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
13 lines
284 B
TypeScript
13 lines
284 B
TypeScript
//// [tests/cases/compiler/contextualTyping10.ts] ////
|
|
|
|
//// [contextualTyping10.ts]
|
|
class foo { public bar:{id:number;}[] = [{id:1}, {id:2}]; }
|
|
|
|
//// [contextualTyping10.js]
|
|
"use strict";
|
|
class foo {
|
|
constructor() {
|
|
this.bar = [{ id: 1 }, { id: 2 }];
|
|
}
|
|
}
|