Skip to content

import type from from "foo" #56376

@magic-akari

Description

@magic-akari

🔎 Search Terms

  • type import
  • parser
  • import type from from

🕗 Version & Regression Information

  • This is a crash
  • This changed between versions ______ and _______
  • This changed in commit or PR _______
  • This is the behavior in every version I tried, and I reviewed the FAQ for entries about _________
  • I was unable to test this on prior versions because _______

⏯ Playground Link

https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAMyhEjmoERQKYEMDGMGA3HAPRlwQDWAUKJLHDAJ5jZwAeaKcWehEuUo164aPFbseqJL34EipCnDC4oAZw7YoyKEA

💻 Code

import from from "react"; // ok
import type x from "react"; // ok
import type from from "react"; // parse error

🙁 Actual behavior

parse error

🙂 Expected behavior

I have merely observed its inconsistency, without discerning whether it is by design or a bug.

Additional information about the issue

No response

Metadata

Metadata

Assignees

Labels

BugA bug in TypeScriptFix AvailableA PR has been opened for this issue

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions