Skip to content

Latest commit

 

History

History
19 lines (12 loc) · 762 Bytes

part5.md

File metadata and controls

19 lines (12 loc) · 762 Bytes

Optional: A bit of auto-magic

  • Instal ts2kt from npm - npm install -g ts2kt. This utility can be used to automatically convert TypeScript definitions to kotlin bindings. Some libraries have TypeScript definitions bundled in, while many others can be found in the DefinitelyTyped repo.

  • Check functions/node_modules/firebase-admin/lib for .d.ts files.

  • Try to convert index.d.ts to Kotlin:

ts2kt functions/node_modules/firebase-admin/lib/index.d.ts
  • Examine the generated files. Those are helpful to understand how ts2kt works, but unfortunately generated code requires a lot of polishing.

Links: