Skip to content

Support using newline as separator in type literals #454

Closed
@LinusU

Description

@LinusU

As of #40 we now have a choice of semiColons and commas for typeLiteral.separatorKind. But some current style guides, e.g. ts-standard, mandates that there should be no separator at all, apart from the newline character.

My feature request is to add a newLines (or similarly named) option to typeLiteral.separatorKind.multiLine.

Another possibility would be to have it tied in to the semiColons option, which in a way makes more sense. But I'm not sure how the options would be named best.

e.g. if i have "semiColons": "asi" I wouldn't expect semicolons to show up at the end of each line in a type literal. But if the config value of typeLiteral.separatorKind is semiColons that could be interpreted as both "put semicolons there always" and "use the value of semiColons".

Hmm, I think both are good approaches, but I think that I personally would prefer that "semiColons": "asi" would remove the semicolons from type literals as well.

I'd be happy to try making a PR, when we know what we want!

Metadata

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