Skip to content

Trailing comma in import type attribute should be allowedΒ #61916

Closed
@fisker

Description

@fisker

πŸ”Ž Search Terms

"import type", "trailing comma"

πŸ•— Version & Regression Information

N/A

⏯ Playground Link

https://www.typescriptlang.org/play/?#code/C4TwDgpgBAglC8UCWBbMB7ATsAFAIgDN108AaKAbwFgAoKeqAdyWAAsAuauhn0SdgOQArAM7oAdgNK0eAX2k1ZASiA

πŸ’» Code

type A = import("foo", {
    with:{
        type:'json',
    },  // <- I don't see why this is not allowed
})

πŸ™ Actual behavior

'}' expected.

πŸ™‚ Expected behavior

No error

Additional information about the issue

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Fix AvailableA PR has been opened for this issueHelp WantedYou can do thisPossible ImprovementThe current behavior isn't wrong, but it's possible to see that it might be better in some cases

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions