Fitbit SDK Types
Add types to your Fitbit project to use safely the SDK.
This is a work in progress project to add static typing for the FITBIT SDK modules.
How to use in your app project
- Add this project as to your
devDependencies
with npm install --save-dev fitbit-sdk-types
. - Add a reference type to any of your files, or to a
global.d.ts
one with /// <reference types="fitbit-sdk-types" />
. - Profit!
app/index.ts
import { Accelerometer } from "accelerometer";
const acc = new Accelerometer();
console.log(acc.activated);
console.log(acc.potato);
Examples
You can see a ton of official examples working as tests right here, under the ./test
path.
Contributing
Make a PR submitting at least the desired test examples to work under the .test
path, ideally with some link to any of the Fitbit official sources to get more info.
Remainig
- All the Companion APIs.
- Some App's
document
module types (mostly WhateverElement
).