NativeScript / NativeScript/android-dts-generator

ns typings android "androidx.activity:activity" may see `<set-?>` as value param names.

Open
#83 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
96
Forks
25
PR merge metrics
No merged PRs in 30d

Description

Example A:

public setMediaType$activity_release(<set-?>: androidx.activity.result.contract.ActivityResultContracts.PickVisualMedia.VisualMediaType): void;

The <set-?> is invalid. Should print as value.

B

Other entries may print as public createOnBackAnimationCallback(onBackStarted: any<any,any>, onBackProgressed: any<any,any>, onBackInvoked: any, onBackCancelled: any): globalAndroid.window.OnBackInvokedCallback;

where any<any,any> should be just any or proper generic.

C

public static enable($i$a$-also-EdgeToEdge$enableEdgeToEdge$impl$1: androidx.activity.ComponentActivity, it: androidx.activity.SystemBarStyle, view: androidx.activity.SystemBarStyle): void;

can be:

public static enable(activity: androidx.activity.ComponentActivity, it: androidx.activity.SystemBarStyle, view: androidx.activity.SystemBarStyle): void;

D

public onStateChanged(servedView: androidx.lifecycle.LifecycleOwner, $i$a$-synchronized-ImmLeaksCleaner$onStateChanged$1$success$1: androidx.lifecycle.Lifecycle.Event): void;

can be:

public onStateChanged(servedView: androidx.lifecycle.LifecycleOwner, event: androidx.lifecycle.Lifecycle.Event): void;

E

public getDetectDarkMode$activity_release(): any<globalAndroid.content.res.Resources,java.lang.Boolean>;

can be:

public getDetectDarkMode$activity_release(): java.util.HashMap<globalAndroid.content.res.Resources,java.lang.Boolean>;

F

public static auto(lightScrim: number, darkScrim: number, detectDarkMode: any<any,java.lang.Boolean>): androidx.activity.SystemBarStyle;

can be:

public static auto(lightScrim: number, darkScrim: number, detectDarkMode: boolean): androidx.activity.SystemBarStyle;

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

Start at the generator entry point and reproduce declaration output for the androidx.activity classes shown in examples A–F. Trace how parameter names, generic types, and inferred return types are parsed or rendered, then verify that the generated typings replace invalid names and incorrect types with the expected declarations.

Written by the indexing model from the issue text.

Assessment

Tech stack
android, java, typescript
Domain
mobile-dev, tooling
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
48/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.