Skip to content

function type in union type not work? #39546

@keelii

Description

@keelii
type fn = (param: number) => string

// works
type t1 = string | fn

// not works, why?
type t2 = string | (param: number) => string

Metadata

Metadata

Assignees

No one assigned

    Labels

    QuestionAn issue which isn't directly actionable in code

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions