-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.
Description
Prettier 3.2.5
Playground link
Input:
type A = import("foo", {with: {type: "json"}})Output for typescript parser:
type A = import("foo")Output for babel-ts parser:
SyntaxError: Unexpected token, expected ")" (1:22)
Expected output:
type A = import("foo", { with: { type: "json" } });Why?
Because we all love spec changes.
I don't know if anyone would need this currently, just found it when trying to understand difference between two AST representations.
LordParsley
Metadata
Metadata
Assignees
Labels
lang:typescriptIssues affecting TypeScript-specific constructs (not general JS issues)Issues affecting TypeScript-specific constructs (not general JS issues)locked-due-to-inactivityPlease open a new issue and fill out the template instead of commenting.Please open a new issue and fill out the template instead of commenting.