Closed
Description
Bug Report
π Search Terms
- import type
- duplicate identifier
- namespace
- type
- value
π Version & Regression Information
This is the behavior in every version I tried, and I reviewed the FAQ for entries about import type
.
β― Playground Link
I don't think this is possible to demonstrate in the playground as it needs a module to import *
from?
π» Code
// Works
import type { T } from 'foo'
declare const T: any
// Doesn't work, but should
import type { T } from 'foo'
import * as T from 'bar'
π Actual behavior
Duplicate identifier 'T'.
π Expected behavior
The compiler should recognise that one identifier is a type and the other a value and allow the two to coexist, as it does in other scenarios.