Typescript support for fitbit apps development
Set-up
- Install package
npm install fitbit-sdk-typed --save-dev
- Configure your tsconfig.json
"compilerOptions":
- 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
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.