TypeScript/tests/cases/compiler/betterErrorForUnionCall.ts
2019-06-28 23:23:17 +03:00

9 lines
246 B
TypeScript

declare const union: { a: string } | { b: string }
union("");
declare const fnUnion: { a: string } | ((a: string) => void)
fnUnion("");
declare const fnUnion2: (<T extends number>(a: T) => void) | (<T>(a: string) => void)
fnUnion2("");