Skip to content

Fix nested tuple expression functional inference #565

@ssalbdivad

Description

@ssalbdivad

Nesting a tuple expression requiring functional inference in a tuple like this currently breaks validation. This is likely a convoluted TS bug, as the equivalent form in an object literal is correctly inferred:

// @ts-expect-error
type([["boolean", "=>", (b) => b === true]]).infer

I tried for a very long time to fix this to no avail. Workaround is to use an expression helper like:

type([narrow("boolean", (b) => b === true)])

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    Status

    Done (merged or closed)

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions