Skip to content

Instantiation expressions not allowed in logical/coalescing expressions #49362

Closed
@DanielRosenwasser

Description

@DanielRosenwasser
declare let f: undefined | (<T>(x: T) => T);

let g = f<string> || ((x: string) => string);

Maybe OT Since you are fine-tuning how instantiation expressions are parsed: it's weird that a<b> ?? c is not valid code, from a syntactic point of view.

Originally posted by @nicolo-ribaudo in #49353 (comment)

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions