Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

fitbit-sdk-types

Package Overview
Dependencies
Maintainers
1
Versions
79
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fitbit-sdk-types - npm Package Compare versions

Comparing version 0.1.1 to 0.2.0

device/document/document.d.ts

38

package.json
{
"name": "fitbit-sdk-types",
"version": "0.1.1",
"description": "Work in progress. Types for Fitbit SDK.",
"scripts": {
"test-device": "tsc -p test/device",
"test-companion": "tsc -p test/companion",
"test": "npm run test-device && npm run test-companion"
},
"devDependencies": {
"typescript": "^3.1.1"
},
"author": "Sergio Morchón Poveda",
"repository": {
"type": "git",
"url": "https://github.com/SergioMorchon/fitbit-sdk-types"
},
"license": "ISC"
"name": "fitbit-sdk-types",
"version": "0.2.0",
"description": "Work in progress. Types for Fitbit SDK.",
"scripts": {
"test-device": "tsc -p test/device",
"test-companion": "tsc -p test/companion",
"test-settings": "tsc -p test/settings",
"test": "npm run test-device && npm run test-companion && npm run test-settings"
},
"devDependencies": {
"typescript": "^3.1.1"
},
"author": "Sergio Morchón Poveda",
"repository": {
"type": "git",
"url": "https://github.com/SergioMorchon/fitbit-sdk-types"
},
"license": "ISC",
"dependencies": {
"@types/react": "^16.4.16"
}
}
# Fitbit SDK Types
Add types to your Fitbit project to use safely the SDK.
Add types to your Fitbit project to use safely the SDK, work safely with TypeScript preventing you of doing stupid mistakes.
_This is a work in progress project to add static typing for the FITBIT SDK modules._
## How to use in your app project
1. Add this project as to your `devDependencies`with `npm install --save-dev fitbit-sdk-types`.
2. Add a reference to your target folder's `tsconfig.json` file:
**app/tsconfig.json**
2. Add a reference in your target folder's `tsconfig.json` file:
**app/tsconfig.json**
```json
{
"extends": "../tsconfig.json",
"include": [
"./",
"../node_modules/fitbit-sdk-types/device"
]
"compilerOptions": {
"checkJs": true
},
"include": ["./", "../node_modules/fitbit-sdk-types/device"]
}
```
3. And use it:
**app/index.ts**
**app/index.js**
```typescript
import { Accelerometer } from "accelerometer";
import { Accelerometer } from 'accelerometer';

@@ -38,6 +39,1 @@ const acc = new Accelerometer();

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`).
declare module 'cbor' {
export function encode(data: any): ArrayBuffer;
export function decode(data: ArrayBuffer | ArrayBufferView): any;
export class Float {
value: number;
}
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc