FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

feat(core): type the consolidated @NativeClass decorator options by NathanWalker · Pull Request #11357 · NativeScript/NativeScript · GitHub

feat(core): type the consolidated @NativeClass decorator options - #11357

Open
NathanWalker wants to merge 1 commit into
mainfrom
feat/nativeclass-decorator-types
Open

feat(core): type the consolidated @NativeClass decorator options#11357
NathanWalker wants to merge 1 commit into
mainfrom
feat/nativeclass-decorator-types

Conversation

NathanWalker commented Aug 20, 2026
edited
Loading

Copy link
Copy Markdown
Contributor

Runtime 9.1+ (ios#403 and the Android counterpart) applies @NativeClass itself and accepts per-platform options:

  @NativeClass({
    ios: { name, protocols, methods },
    android: { name, interfaces },
  })

Mirror that shape in global-types.d.ts, using the same interface names as @nativescript/ios types/ns-nativeclass.d.ts so both declaration sets merge cleanly in one program. The previous top-level protocols / interfaces keys stay as @deprecated aliases (both runtimes still read them); nativeClassName is @deprecated because neither runtime ever read it from the options. The overloads now return the class / decorator type instead of implicit any.

Runtime 9.1 (ios#403 and the Android counterpart) applies `@NativeClass`
itself and accepts per-platform options:

  @nativeclass({
    ios: { name, protocols, methods },
    android: { name, interfaces },
  })

Mirror that shape in global-types.d.ts, using the same interface names as
@nativescript/ios `types/ns-nativeclass.d.ts` so both declaration sets
merge cleanly in one program. The previous top-level `protocols` /
`interfaces` keys stay as @deprecated aliases (both runtimes still read
them); `nativeClassName` is @deprecated because neither runtime ever
read it from the options. The overloads now return the class / decorator
type instead of implicit any.
NathanWalker added this to the 9.1.1 milestone Aug 20, 2026

nx-cloud Bot commented Aug 20, 2026
edited
Loading

Copy link
Copy Markdown

View your CI Pipeline Execution ↗ for commit dad0173

Command Status Duration Result
nx test apps-automated -c=android ✅ Succeeded 3m 48s View ↗
nx run-many --target=test --configuration=ci --... ✅ Succeeded <1s View ↗

💡 Verify your cache is correct by running tasks in a sandbox. Read docs ↗


☁️ Nx Cloud last updated this comment at 2026-08-20 19:43:48 UTC

This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant


Back | FazBrowse Home | New Git URL