microsoft / microsoft/TypeScript
TS:1379 An import alias cannot reference a declaration that was exported using 'export type'
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Go
- Estrellas
- 111k
- Forks
- 14.4k
- Merge medio
- 1 d 19 h
- PR fusionados (30 d)
- 117
Descripción
Bug Report
🔎 Search Terms
TS1379
An import alias cannot reference a declaration that was exported using 'export type'
🕗 Version & Regression Information
This has always been the behavior as far as I can tell (edit: tested on all versions listed in playground back to >3.7.5 (changed to export type {...} statement when needed))
⏯ Playground Link
Multi file: repro but I will show in playground.
Below are pictures that might be easier to parse
💻 Code
When annotated with type it errors
When not annotated with type it doesn't error:
🙁 Actual behavior
Exports of types annotated with type error while those not annotated as types do not error even though TS understand it is still a type.
🙂 Expected behavior
Honestly I don't know which of these behaviors is correct - this behavior could be completely intentional as well - intuitively I think these should match and I prefer the behavior with no errors but it is unclear to me if this is an emit issue? I'm sorry if this behavior is on purpose and I have wasted your time. Really appreciate the work!
Guía de contribución
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Línea de trabajo
Comienza con la reproducción enlazada de TypeScript Playground en varios archivos y compara los casos de import-alias anotados y no anotados que producen TS1379. Determina primero si los diagnósticos diferentes son intencionados o si se deben a un defecto de emit/type-checking; se considera terminado cuando el comportamiento esperado está establecido y cubierto por una prueba de regresión adecuada.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- typescript
- Área
- compilers
- Tipo de issue
- Error
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Tranquilo
- Claridad
- Necesita aclaración
- Aptitud para principiantes
- 35/100