Files
tsgo/testdata/baselines/reference/submodule/compiler/betterErrorForUnionCall.js

19 lines
431 B
TypeScript

//// [tests/cases/compiler/betterErrorForUnionCall.ts] ////
//// [betterErrorForUnionCall.ts]
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("");
//// [betterErrorForUnionCall.js]
"use strict";
union("");
fnUnion("");
fnUnion2("");