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 1.0.0 to 1.0.1

tslint.json

10

package.json
{
"name": "fitbit-sdk-types",
"version": "1.0.0",
"version": "1.0.1",
"description": "Types for Fitbit SDK.",
"scripts": {
"build": "tsc",
"test": "tsc -p test"
"test": "tsc -p test",
"prettier": "prettier **/*.ts **/*.tsx **/*.json **/*.md",
"tslint": "tslint src/**/*.ts",
"check-code": "npm run tslint && npm run prettier -- -l",
"fix-code": "npm run tslint -- --fix && npm run prettier -- --write"
},
"devDependencies": {
"prettier": "^1.14.3",
"tslint": "^5.11.0",
"typescript": "^3.1.1"

@@ -11,0 +17,0 @@ },

19

README.md
# Fitbit SDK Types
[![npm version](https://badge.fury.io/js/fitbit-sdk-types.svg)](https://badge.fury.io/js/fitbit-sdk-types)
[![Build Status](https://travis-ci.org/SergioMorchon/scroll-based-carousel.svg?branch=master)](https://travis-ci.org/SergioMorchon/scroll-based-carousel)
Add types to your Fitbit project to use safely the SDK, work safely with TypeScript preventing you of doing stupid mistakes.

@@ -13,7 +16,3 @@

"extends": "./node_modules/@fitbit/sdk/sdk-tsconfig.json",
"include": [
"node_modules/fitbit-sdk-types/src",
"./**/*.ts",
"./**/*.tsx"
]
"include": ["node_modules/fitbit-sdk-types/src", "./**/*.ts", "./**/*.tsx"]
}

@@ -38,8 +37,8 @@ ```

* **Avoid using `any` in callbacks of defined functions**:
TypeScript will give it the correct type, but only if you let it be. If you cast them as any other type, you could be hiding errors (either in your code or in this type definition, or even in the official documentation).
- **Avoid using `any` in callbacks of defined functions**:
TypeScript will give it the correct type, but only if you let it be. If you cast them as any other type, you could be hiding errors (either in your code or in this type definition, or even in the official documentation).
* **Be careful about what you import**:
Currently, there is only **one** Fitbit build process for **up to 3** different targets -to know: `app`, `companion` and `settings`-.
So because of this, I didn't found a way of having one single `tsconfig.json` called from the *fitbit-cli* and different typings per target. So you will have to declare them all together, knowing that -for example- although there is an ambien module for `accelerometer`, it won't exist inside the `companion` target.
- **Be careful about what you import**:
Currently, there is only **one** Fitbit build process for **up to 3** different targets -to know: `app`, `companion` and `settings`-.
So because of this, I didn't found a way of having one single `tsconfig.json` called from the _fitbit-cli_ and different typings per target. So you will have to declare them all together, knowing that -for example- although there is an ambien module for `accelerometer`, it won't exist inside the `companion` target.

@@ -46,0 +45,0 @@ ## Contributing

@@ -6,4 +6,4 @@ declare module 'appbit' {

readonly buildId: string;
readonly permissions: Permissions;
onunload(this: Appbit, event: Event): void;
readonly permissions: Permissions;
exit(): void;

@@ -10,0 +10,0 @@ }

@@ -6,3 +6,6 @@ declare module 'clock' {

}
interface Clock {
interface Clock
extends EventTarget<{
tick: TickEvent;
}> {
granularity: Granularity;

@@ -9,0 +12,0 @@ ontick: (event: TickEvent) => void;

@@ -27,3 +27,2 @@ declare module 'companion' {

onunload: (event: Event) => void;
yield(): void;
monitorSignificantLocationChanges: boolean;

@@ -35,4 +34,5 @@ onsignificantlocationchange: (

wakeInterval: number | undefined;
yield(): void;
}
export const me: Companion;
}

@@ -34,5 +34,5 @@ type ElementState =

value: number | [number, number];
enabled: boolean;
animate(trigger: string): void;
sendEvent(event: Event): void;
enabled: boolean;
}

@@ -39,0 +39,0 @@ interface ScrollIndicatorElement extends ContainerElement {

@@ -52,3 +52,10 @@ declare module 'fs' {

): FileDescriptor;
export function listDirSync(path: string): Iterator<string>;
interface DirectoryIteratorResult {
readonly done: boolean;
readonly value: string | undefined;
}
interface DirectoryIterator {
next(): DirectoryIteratorResult;
}
export function listDirSync(path: string): DirectoryIterator;
}

@@ -11,2 +11,2 @@ type PermissionName =

granted(permissionName: PermissionName): boolean;
}
}

@@ -14,6 +14,6 @@ type BatchedReading<Reading> = { [P in keyof Reading]: Array<Reading[P]> };

onreading: (event: Event) => void;
readonly readings: BatchedReading<BatchReading>;
readonly activated: boolean;
start(): void;
stop(): void;
readonly activated: boolean;
readonly readings: BatchedReading<BatchReading>;
}

@@ -20,0 +20,0 @@

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