Skip to content

Splitting a default tuple type across multiple lines breaks highlighting #1040

Open
@adeniszczyc

Description

JavaScript and TypeScript Nightly version: 5.6.0-dev.20240819

Splitting a tuple across multiple lines, which is used as the default type for a parameter on a method in an interface or class in a declaration file (.d.ts), breaks syntax highlighting below that line.

Code

// Please include a code snippet that demonstrates the issue
export interface Broken {
    a<A extends [number] = [
        number
    ]>(value: number): boolean;

    b(value: number): string;
}

export interface Other {
    constructor(name: string);
}

Broken:
broken_interface

Working:
working_interface

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions