TypeScript/tests/cases/compiler/freshLiteralTypesInIntersections.ts

8 lines
185 B
TypeScript
Raw Normal View History

2017-11-02 22:48:34 +01:00
// @strict: true
// Repro from #19657
declare function func<A extends string, B extends A>(a: A, b: B[]): (ab: A & B) => void;
const q = func("x" as "x" | "y", ["x"]);
q("x");