Skip to content
This repository was archived by the owner on May 12, 2025. It is now read-only.
This repository was archived by the owner on May 12, 2025. It is now read-only.

Bug with generics: TS7060: This syntax is reserved in files with the .mts or .cts extension. Add a trailing comma or explicit constraint. #330

@d00rsfan

Description

@d00rsfan

Generic function:
const someFunction = <T>(param: T) => param;

in .mts files must be trailing coma in generic type:
const someFunction = <T,>(param: T) => param;

Problem is in lib/shared.js:69
generics: baseStyleRules['comma-dangle'][1].arrays,

which is declared in rules/style.js:46 as arrays: 'always-multiline',

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions