Skip to content

import { type X } not flagged in JavaScript #48445

Description

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 flaggedimport{typeComponentType}from'react';// Flaggedimporttype{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

Metadata

Metadata

Assignees

No one assigned

    Labels

    BugA bug in TypeScriptDomain: JavaScriptThe issue relates to JavaScript specificallyHelp WantedYou can do this

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions