TypeScript/tests/cases/compiler/errorMessageOnIntersectionsWithDiscriminants01.ts

11 lines
194 B
TypeScript
Raw Normal View History

2019-03-28 07:18:49 +01:00
// @noEmit: true
export type Common = { test: true } | { test: false };
export type A = Common & { foo: 1 };
export type B = Common & { bar: 1 };
declare const a: A;
declare let b: B;
b = a;