Skip to content

feat(typescript): support TSImportType#4429

Merged
ikatyang merged 2 commits into
prettier:masterfrom
ikatyang:feat/typescript-import-type
May 6, 2018
Merged

feat(typescript): support TSImportType#4429
ikatyang merged 2 commits into
prettier:masterfrom
ikatyang:feat/typescript-import-type

Conversation

@ikatyang

@ikatyang ikatyang commented May 6, 2018

Copy link
Copy Markdown
Member

Ref: microsoft/TypeScript#22592


Prettier pr-4429
Playground link

--parser typescript

Input:

export const x:import(   "./foo"   )={x:0,y:0};

export let y:import("./foo2"   ).Bar.I={a:"",b:0};

export let shim:typeof import(   "./foo2")={Bar: Bar2};

Output:

export const x: import("./foo") = { x: 0, y: 0 };

export let y: import("./foo2") = { a: "", b: 0 };

export let shim: import("./foo2") = { Bar: Bar2 };

@j-f1 j-f1 left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you add another run_spec with singleQuote: true?

@ikatyang
ikatyang merged commit cc4392e into prettier:master May 6, 2018
@ikatyang
ikatyang deleted the feat/typescript-import-type branch May 6, 2018 23:58
@lipis lipis added this to the 1.13 milestone May 9, 2018
@lock lock Bot added the locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting. label Aug 7, 2018
@lock lock Bot locked as resolved and limited conversation to collaborators Aug 7, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

locked-due-to-inactivity Please open a new issue and fill out the template instead of commenting.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants