This is a great description! I was wondering why we needed new syntax since importing types always worked they way I expected (I don't use babel). The `var foo: import('foo')` syntax from 2.9 should avoid emitting code, right?
-
-
-
It would also yeah (I use that a bunch in the TS website) https://github.com/microsoft/TypeScript-Website/blob/v2/packages/playground/src/exporter.ts#L1-L5 …
- Još 7 drugih odgovora
Novi razgovor -
-
-
The annoying nit I have here is that Babel often *can* figure this out, but not when the declaration is exported. With export { Foo } from "other-module" it's not clear whether that code should be erased or not.
-
I see, so the transitive re-export behavior is what makes it extra tricky. Is that because it’s a double lookup? I’m not sure how babel can tell value vs types without reading the other files
- Još 5 drugih odgovora
Novi razgovor -
-
-
So this is the same as Flow’s syntax right? Are there any plans to have a tsconfig.json flag that can enforce one syntax for importing types?
-
Yep, it’s in the release notes: importsNotUsedAsValueshttps://devblogs.microsoft.com/typescript/announcing-typescript-3-8-beta/ …
- Još 1 odgovor
Novi razgovor -
-
-
is there any roadmap for the typescript compiler as a whole? is it going to converge into babel and turn into just a type checker like flow? or is there continued investment? wondering if my efforts in the transformer space atm might be abandonware in a few years hehe
-
it's not going away, roadmap is on the wiki
- Još 1 odgovor
Novi razgovor -
-
-
awesome! i was wondering about how babel handles this. will also be nice for keeping things tidy
Hvala. Twitter će to iskoristiti za poboljšanje vaše vremenske crte. PoništiPoništi
-
-
Tweet je nedostupan.
Čini se da učitavanje traje već neko vrijeme.
Twitter je možda preopterećen ili ima kratkotrajnih poteškoća u radu. Pokušajte ponovno ili potražite dodatne informacije u odjeljku Status Twittera.