mirror of
https://github.com/hanzoai/tsgo.git
synced 2026-10-30 19:37:15 +00:00
10 lines
275 B
TypeScript
10 lines
275 B
TypeScript
//// [tests/cases/compiler/contextualTyping20.ts] ////
|
|
|
|
//// [contextualTyping20.ts]
|
|
var foo:{id:number;}[] = [{id:1}]; foo = [{id:1}, {id:2, name:"foo"}];
|
|
|
|
//// [contextualTyping20.js]
|
|
"use strict";
|
|
var foo = [{ id: 1 }];
|
|
foo = [{ id: 1 }, { id: 2, name: "foo" }];
|