NativeScript / NativeScript/android

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

Open
#1,922 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C++
Stars
563
Forks
144
Avg merge
10h 46m
Merged PRs (30d)
14

Description

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 {
          }
        }
      }
    }
  }
}

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Locate the metadata generator entry point responsible for class definitions and inspect how generated TypeScript declarations handle classes without a superclass. Compare output for a class such as Layer and verify that java.lang.Object appears for classes with no inherited class; add or run the generator's relevant validation if available.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
mobile-dev, tooling
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.