NativeScript / NativeScript/android

[Metadata generator] Add default extend to java.lang.Object for class definitions that don't inherit

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

还没有人认领这个 Issue。

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

描述

Is your feature request related to a problem? Please describe.
In TS definitions, classes that don't inherit from other classes are missing the java.lang.Object inherited methods because the generator doesn't ensure they inherit from that class.

Describe the solution you'd like
Let class types that don't inherit from any class extend java.lang.Object.
e.g.

declare module org {
  export module maplibre {
    export module android {
      export module style {
        export module layers {
          export abstract class Layer extends java.lang.Object {
          }
        }
      }
    }
  }
}

贡献指南

打开贡献指南

从这里开始

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

调研方向

找到负责类定义的元数据生成器入口点,并检查生成的 TypeScript 声明如何处理没有超类的类。比较 Layer 之类的类的输出,并验证没有继承类的类会出现 java.lang.Object;如果生成器有相关验证,请添加或运行该验证。

由索引模型根据 Issue 内容生成。

评估

技术栈
typescript
领域
mobile-dev, tooling
Issue 类型
功能
难度
3/5
预计耗时
1-2 天
活跃度
停滞
描述清晰度
基本清楚
新手友好度
45/100

把新 issue 发到你的邮箱

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