Skip to content

feat(typescript): support TSImportType #4429

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 6, 2018

Conversation

ikatyang
Copy link
Member

@ikatyang ikatyang commented May 6, 2018

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 };

Copy link
Member

@j-f1 j-f1 left a comment

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