Skip to content

TypeScript 5 const Type Parameters incorrectly highlighted #2564

@markglattback

Description

@markglattback

The following code is incorrectly highlighted when using the new const Type Parameters with TS 5.0.x and Volar 1.3.8 (pre-release)

function myFunc<const T extends string[]>(arr: T): T {
  return arr
}

//  error: Type parameter declaration expected. ts(1139)

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions