`import type Foo...` is not semantically equivalent to `import type * as Foo...`
- Vorherrschende Sprache
- Rust
- Sterne
- 22.3k
- Forks
- 1.9k
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
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).
Beitragsleitfaden
Bewertung
Dieses Issue wurde noch nicht bewertet.