1.0.1 • Published 5 years ago

fitbit-sdk-typed v1.0.1

Weekly downloads
2
License
ISC
Repository
github
Last release
5 years ago

Typescript support for fitbit apps development

Set-up

  1. Install package
npm install fitbit-sdk-typed --save-dev
  1. Configure your tsconfig.json
"compilerOptions": {
    ...
    "types": null, /* Or add 'fitbit-sdk-typed' to the array */
    "typeRoots": [
      "node_modules/@types",
      "node_modules/fitbit-sdk-typed"
    ],
    ...
  1. Happy coding!

More info

All the interfaces are created from SDK references by hand in TypeScript.

After that found some between documentation and actual runtime objects and their properties, then checked during runtime for js object properties and such.

Example use

Linting example

WARNING!

  • Keep in mind which imports are accessible to Device and which to Companion.

Although Fitbit's compiler here will quickly throw error about that.

  • Be aware! Documentation is far from perfect that means this package won't be perfect either. Although for common cases you should be fine.