Skip to content

import { type X } not flagged in JavaScript #48445

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

Closed
Josh-Cena opened this issue Mar 27, 2022 · 0 comments Β· Fixed by #48449
Closed

import { type X } not flagged in JavaScript #48445

Josh-Cena opened this issue Mar 27, 2022 · 0 comments Β· Fixed by #48449
Labels
Bug A bug in TypeScript Domain: JavaScript The issue relates to JavaScript specifically Help Wanted You can do this
Milestone

Comments

@Josh-Cena
Copy link
Contributor

Bug Report

πŸ”Ž Search Terms

import type javascript error

πŸ•— Version & Regression Information

  • This is the behavior in every version I tried

⏯ Playground Link

Playground link with relevant code

πŸ’» Code

// Not flagged
import { type ComponentType } from 'react';
// Flagged
import type { ReactNode } from 'react';

πŸ™ Actual behavior

import { type X } is not flagged as "can only be used in TypeScript files" but crashes at runtime

πŸ™‚ Expected behavior

It should be an error

@RyanCavanaugh RyanCavanaugh added Bug A bug in TypeScript Help Wanted You can do this labels Mar 28, 2022
@RyanCavanaugh RyanCavanaugh added this to the Backlog milestone Mar 28, 2022
@DanielRosenwasser DanielRosenwasser added the Domain: JavaScript The issue relates to JavaScript specifically label Mar 29, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bug A bug in TypeScript Domain: JavaScript The issue relates to JavaScript specifically Help Wanted You can do this
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants