-
Notifications
You must be signed in to change notification settings - Fork 12.9k
Closed
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug
Description
TypeScript Version: 3.4.0-dev.201xxxxx
Search Terms:
parser, arrow, union
Code
declare const a: string | (a: string, b: boolean) => string
declare const b: string | () => string
declare const c: string | () => string | number | () => boolean
Expected behavior:
declare const a: string | (a: string, b: boolean) => string
>a : string | ((a: string, b: boolean) => string)
>a : string
>b : boolean
declare const b: string | () => string
>b : string | (() => string)
// ?
declare const c: string | () => string | number | () => boolean
>c : string | (() => string | number | (() => boolean))
Actual behavior:
parse error
Playground Link:
Related Issues:
#25898
Metadata
Metadata
Assignees
Labels
Working as IntendedThe behavior described is the intended behavior; this is not a bugThe behavior described is the intended behavior; this is not a bug