Help prepare for 2025 → Answer 8 simple questions on our Fall Survey
Open Survey

Generate types for iOS

cli
ns typings ios

This will generate the following folder structure typings/ios/arm64

Generate types for Android

For Android run:

cli
ns typings android --jar <path to a jar>
# or
ns typings android --aar <path to an aar>

You can also generate typings for an Android package (Maven):

cli
ns typings android <package-name>

For instance:

cli
ns typings android "com.google.android.gms:play-services-tasks"

Custom code

  1. Reference the generated types in references.d.ts
  2. You can now code against the platform native APIs (strongly typed). For various examples on how to interact with native APIs in JavaScript/TypeScript, visit the Subclassing, iOS Marshalling and Android Marshalling pages.

Additional Resources