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.0.1 to 0.0.2

48

index.d.ts

@@ -1,3 +0,49 @@

/// <reference path="./src/device/sensor.d.ts" />
type PermissionName =
| 'access_activity'
| 'access_user_profile'
| 'access_heart_rate'
| 'access_location'
| 'access_internet'
| 'run_background';
interface Permissions {
granted(permissionName: PermissionName): boolean;
}
type BatchedReading<Reading> = { [P in keyof Reading]: Array<Reading[P]> };
interface Sensor<Reading> {
readonly activated: boolean;
onactivate(event: Event): void;
onerror(event: SensorErrorEvent): void;
onreading(event: Event): void;
start(): void;
stop(): void;
readonly readings: BatchedReading<Reading>;
}
interface SensorErrorEvent {
readonly defaultPrevented: boolean;
readonly error: Error;
readonly target: EventTarget;
readonly type: string;
}
interface BatchedSensorReading {
readonly timestamp: Float32Array;
}
interface SensorReading {
readonly timestamp: number | null;
}
interface SensorOptions {
readonly frequency?: number | undefined;
readonly batch?: number | undefined;
}
interface BatchedSensorOptions extends SensorOptions {
readonly batch?: number | undefined;
}
declare module 'accelerometer' {

@@ -4,0 +50,0 @@ interface AccelerometerReading {

2

package.json
{
"name": "fitbit-sdk-types",
"version": "0.0.1",
"version": "0.0.2",
"description": "Work in progress. Types for Fitbit SDK.",

@@ -5,0 +5,0 @@ "scripts": {

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