Skip to content

Conditional type doesn't work inside tuple #40067

Closed

Description

TypeScript Version: 4.1.0-dev.20200807

Search Terms: conditional type tuple

Code

type Tuple<T> = [T extends null ? T? : T];

Expected behavior:
Expected the definition to work as expected.

Actual behavior:
Got the following error:

JSDoc types can only be used inside documentation comments.

Playground Link: Playground Link

Related Issues: Did not find anything close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    Working as IntendedThe behavior described is the intended behavior; this is not a bug

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions