Open uglyer opened 7 years ago
Amazing~ 👍 :)
等ts2kt修复bug遥不可及,手动翻译了一下.d.ts文件,成功的用kotlin尝试,但是有些问题,譬如调用super的方法 super.onCreate kotlin 编译后的js 是 this.onCreate(savedInstanceState, android.app.Activity.prototype.onCreate$default.bind(this)); 执行就报错了 Cannot read property 'bind' of undefined 手动把mCalled改为true发现可以用,很意外。
移植anko成功.
1.Install ts2kt https://github.com/Kotlin/ts2kt 2.Converter of android-ui.d.ts to Kotlin declarations (stubs) 3.Dev in Kotlin your app. 4.Build KotlinJS project.
wait bug fixed https://github.com/Kotlin/ts2kt/issues/53