-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Ability to 'import' Typescript libraries #23423
Comments
I suggest potentially looking at the DEP process on https://github.com/dart-lang/dart_enhancement_proposals to get more traction on this kind of request. Added Area-LanguageFeature, Triaged labels. |
Work related to this is in-progress. Stay tuned... cc @jacob314. |
I've tried to make my implementation of .d.ts -> dart2js annotations converter. Please, see https://github.com/denis-aes/DefinitelyTyped.dart |
Hmmmm ... this is dead? |
@kevmoo is this still being worked on? |
I don't believe anyone is currently working on this issue. |
see babylon_dart for some good examples of how to handle this problem also, i'm having very good luck w/ protobuf-ts and dart protocol buffers for marshaling between the two languages, within the browser. |
indeed, as @lrhn, this seems to be closer to the area of JS-interop. Since the time this issue was filed we have added support for interoperability between Dart and JavaScript via We are still actively working on improving the JS-interop story, so the solution will continue to change. That being said, our plans involve improvements in making the JS-interop declarations more ergonomic and idiomatic in Dart, but we do not have any plans that will make JS constructs like a ES6 module import directly accessible from Dart. For that reason I will be closing this issue at this time. Hope this answers some of your questions. |
disappointing |
Just to be clear: we value interoperability a lot and we are working heavily in this area to provide good building blocks and foundations to make interoperability with JS/TS easy and flexible. Since Dart is a multi-platform language, there are constraints to balance when we think about how to bridge Dart and other languages. As a result, we can't simply make Dart tools accept and understand imports to other languages like TS without some additional hints and binding logic. We do believe, however, that one can make it easier to create those bindings with code generation tools that create JS-interop definitions from .d.ts files (like https://github.com/dart-lang/js_facade_gen, and babylon_dart_gen that you pointed out above). @unicomp21 - using protobuf to marshal between the two languages it's pretty clever! One caveat is that there is a cost in marshalling data. It may not be a cost that is visible in your application, but if it becomes noticeable I'd recommend to check out the Cheers! |
This issue was originally filed by [email protected]
What steps will clearly show the issue / need for enhancement?
2.
3.
What is the current output?
nothing
What would you like to see instead?
I would like to be able to use Typescript libraries with the 'import' statement.
What version of the product are you using? On what operating system?
latest, 1.11
Please provide any additional information below.
win 8.1
The text was updated successfully, but these errors were encountered: