fitbit-sdk-types
Advanced tools
Comparing version 0.0.1 to 0.0.2
@@ -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 { |
{ | ||
"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": { |
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
Found 1 instance in 1 package
0
2108
3
65