facebook / facebook/flow

`import type Foo...` is not semantically equivalent to `import type * as Foo...`

Abierto
#4,197 1 comentario 0 reacciones 0 asignados Ver en GitHub
question
Lenguaje dominante
Rust
Estrellas
22.3k
Forks
1.9k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

The changelog announced that `import type * as Foo...` was deprecated in favor of `import type Foo...` way back when (https://github.com/facebook/flow/blob/master/Changelog.md#v0190). [This repo](https://github.com/popham/import_type), however, demonstrates that the use case is broken:

```
consumer.js:5
5: var a: node.a = 1;
^^^^^^ a. Property not found in
exports. See: node.js:0

consumer.js:6
6: var b: node.b = 2;
^^^^^^ b. Property not found in
exports. See: node.js:0

Found 2 errors
```

The documentation doesn't mention the use case and I don't see any tests memorializing it. Is support intended for this use case? (Besides the changelog, I noticed a trace over at https://stackoverflow.com/questions/32602957/how-do-you-export-a-flow-type-definition-that-is-imported-from-another-file#comment-53297391).

Guía de contribución

Abrir la guía de contribución

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.