Files

13 lines
284 B
TypeScript

//// [tests/cases/conformance/types/spread/spreadUnion4.ts] ////
//// [spreadUnion4.ts]
declare const a: { x: () => void }
declare const b: { x?: () => void }
const c = { ...a, ...b };
//// [spreadUnion4.js]
"use strict";
const c = Object.assign(Object.assign({}, a), b);