Skip to content
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

feat: type modifier on imports #20101

Closed
wants to merge 8 commits into from

Conversation

snewcomer
Copy link
Contributor

@snewcomer snewcomer commented May 26, 2022

WIP - trying to get this syntax to compile....

Previously, as on Typescript 3.8, we had the ability to import types, albeit on a new line.

import A from 'foo';
import type { AType } from 'foo';

As of 4.5, we can inline that type, making it easier to manage top level imports.

import A, { type AType } from 'foo';

fixer PR (in progress): typescript-eslint/typescript-eslint#5050. Once this is merged, I'll run it on the whole repo.
follow up: #20087

Docs: https://devblogs.microsoft.com/typescript/announcing-typescript-4-5/#type-on-import-names

@kategengler
Copy link
Member

Is this still relevant? It is a draft PR

@NullVoxPopuli
Copy link
Sponsor Contributor

I think it got implemented via #20593 and prior PRs.

@kategengler
Copy link
Member

Closing as completed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants