Skip to content

Rest elements in generic tuple #26113

Closed
@vmit

Description

@vmit

TypeScript Version: 3.1.0-dev.20180801

Search Terms: spread tuple

Code

interface Foo<ArgsT extends any[]> {}

interface Bar<SubArgsT extends any[]> extends Foo<[number, ...SubArgsT]>{ }

Expected behavior: Successful compilation. Array subclasses are not allowed as rest arguments for now, but when it is about generics I expect behavior similar to what is done in #24897

Actual behavior: Failed with TS2574: A rest element type must be an array type.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix AvailableA PR has been opened for this issueIn DiscussionNot yet reached consensusSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions