NativeScript / NativeScript/android

Add complementary Kotlin support

未关闭
#1,468 0 条评论 0 个 reaction 已指派 1 人 在 GitHub 查看

@vmutafov 已经在做这个了。

开始于 2019年9月2日。

feature
主要语言
C++
星标
563
派生
144
平均合并
10 小时 46 分钟
30 天内合并 PR
14

描述

Currently, the way to use Kotlin features in a NativeScript app is by using them as used in a Java code e.g. https://kotlinlang.org/docs/reference/java-to-kotlin-interop.html

There should be a more convenient way of using some features in JS/TS code, thus I propose the following additions to NativeScript's Kotlin support:

  • Add support for calling Kotlin non-boolean properties as used in Kotlin itself
  • Add support for calling Kotlin boolean properties as used in Kotlin itself
  • Add support for requesting an instance of a Kotlin object without accessing the INSTANCE field
  • Add support for calling Kotlin extension functions/properties on a given type as used in Kotlin without using the generated static methods
  • Add support for mapping JS/TS lambdas and functions to Kotlin's functional interfaces (https://github.com/JetBrains/kotlin/blob/master/spec-docs/function-types.md)
  • Add support for calling Companion objects' method as used in Kotlin without needing them to be declared as @JvmStatic
  • Add support for overriding Kotlin properties when extending a Kotlin class using the JS/TS property syntax instead of overriding the getProperty/setProperty methods
  • Add support for calling Kotlin functions which accept an unsigned number as a parameter

贡献指南

打开贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。