admin管理员组文章数量:1355754
I am reading
To leverage one of the many existing libraries written in JavaScript, use package:js. If a TypeScript type definition file exists for a JavaScript library (see DefinitelyTyped for more info), you can use the js_facade_gen tool to generate Dart code for that library.
from .
I am curious how convert javascript library to dart file in the example .dart. I guess there are two steps: 1, generate TypeScript type definition file
(ts file) from the javascript library; 2, Use js_facade_gen to convert ts file to dart.
I hope get more details. but the document is lacking. Any hints weled. Thanks
I am reading
To leverage one of the many existing libraries written in JavaScript, use package:js. If a TypeScript type definition file exists for a JavaScript library (see DefinitelyTyped for more info), you can use the js_facade_gen tool to generate Dart code for that library.
from https://webdev.dartlang/guides/web-programming.
I am curious how convert javascript library to dart file in the example https://github./google/chartjs.dart. I guess there are two steps: 1, generate TypeScript type definition file
(ts file) from the javascript library; 2, Use js_facade_gen to convert ts file to dart.
I hope get more details. but the document is lacking. Any hints weled. Thanks
Share Improve this question asked Jul 1, 2018 at 3:31 BAEBAE 9,00623 gold badges98 silver badges182 bronze badges1 Answer
Reset to default 9There is no way to convert JavaScript to Dart automatically.
package:js
allows you to call JavaScript from Dart in Dart browser apps.
本文标签: convert javascript to dartStack Overflow
版权声明:本文标题:convert javascript to dart - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743948429a2566840.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论