Skip to content

Conditional type doesn't work inside tuple #40067

Closed
@ienzam

Description

@ienzam

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.

Metadata

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