16 lines
563 B
TypeScript
16 lines
563 B
TypeScript
|
// @strictNullChecks: false
|
||
|
|
||
|
declare var union: null | { a: number, b: string };
|
||
|
|
||
|
var n = Object.create(null); // any
|
||
|
var t = Object.create({ a: 1, b: "" }); // {a: number, b: string }
|
||
|
var u = Object.create(union); // {a: number, b: string }
|
||
|
var e = Object.create({}); // {}
|
||
|
var o = Object.create(<object>{}); // object
|
||
|
|
||
|
var a = Object.create(null, {}); // any
|
||
|
var a = Object.create({ a: 1, b: "" }, {});
|
||
|
var a = Object.create(union, {});
|
||
|
var a = Object.create({}, {});
|
||
|
var a = Object.create(<object>{}, {});
|