You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There's still a problem with import type from = require('foo'): (playground link). That seems like a bug if it's expected that from is allowed to be the name of an imported type. Should that be fixed as part of this issue as well?
For context, I'm commenting here because I was linked to this bug from esbuild's issue tracker, and I need to figure out how to handle this kind of type syntax in esbuild.
Edit: Also import type from, {foo} from "foo" doesn't work either: (playground link). Neither does import type from, * as foo from "foo": (playground link). Never mind. It looks like if it did work, the TypeScript compiler would just say "A type-only import can specify a default import or named bindings, but not both." So it should arguably be a different error but it's still an error, so it's still invalid syntax.
🔎 Search Terms
🕗 Version & Regression Information
⏯ Playground Link
https://www.typescriptlang.org/play?#code/JYWwDg9gTgLgBAMyhEjmoERQKYEMDGMGA3HAPRlwQDWAUKJLHDAJ5jZwAeaKcWehEuUo164aPFbseqJL34EipCnDC4oAZw7YoyKEA
💻 Code
🙁 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
The text was updated successfully, but these errors were encountered: