TypeScript/tests/cases/compiler/restUnion3.ts
2017-09-15 10:26:57 -07:00

9 lines
290 B
TypeScript

// @strict: true
declare const nullAndUndefinedUnion: null | undefined;
var rest4: { };
var {...rest4 } = nullAndUndefinedUnion;
declare const unionWithIntersection: ({ n: number } & { s: string }) & undefined;
var rest5: { n: number, s: string };
var {...rest5 } = unionWithIntersection;