Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

import { type X } not flagged in JavaScriptΒ #48445

Copy link
Copy link
@Josh-Cena

Description

@Josh-Cena
Issue body actions

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

Reactions are currently unavailable

Metadata

Metadata

Assignees

No one assigned

    Labels

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

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      Morty Proxy This is a proxified and sanitized view of the page, visit original site.