state can be typed (#25640)

This commit is contained in:
Dominique Rau
2018-05-12 22:58:25 +02:00
committed by Sheetal Nandi
parent a68f617d89
commit 9028a63234

View File

@@ -42,7 +42,7 @@ export declare class Peripheral extends events.EventEmitter {
advertisement: Advertisement;
rssi: number;
services: Service[];
state: string;
state: 'error' | 'connecting' | 'connected' | 'disconnecting' | 'disconnected';
connect(callback?: (error: string) => void): void;
disconnect(callback?: () => void): void;