Skip to content

ReadonlyArray with rest parameters #15972

Description

@NN---

I expect all three functions to be compiled successfully.
TypeScript doesn't allow using ReadonlyArray although it is the same as Array but readonly.

function f(...rest: any[]) { }
function g(...rest: Array<any>) { }
function h(...rest: ReadonlyArray<any>) { }

Metadata

Metadata

Assignees

No one assigned

    Labels

    CommittedThe team has roadmapped this issueSuggestionAn idea for TypeScript

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions