From b11fcff77625bcffe58c4fb5bd81980324733a72 Mon Sep 17 00:00:00 2001 From: Santiago Date: Sun, 25 Dec 2016 21:53:59 -0500 Subject: [PATCH] Added missing return type to on() methods. (johnny-five) (#13553) --- johnny-five/index.d.ts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/johnny-five/index.d.ts b/johnny-five/index.d.ts index c5e058c335..a2621c352d 100644 --- a/johnny-five/index.d.ts +++ b/johnny-five/index.d.ts @@ -118,9 +118,9 @@ export interface CompassOptions { export declare class Compass { constructor(option: CompassOptions); - on(event: string, cb: () => void): void; - on(event: "change", cb: () => void): void; - on(event: "data", cb: (data: any) => void): void; + on(event: string, cb: () => void): this; + on(event: "change", cb: () => void): this; + on(event: "data", cb: (data: any) => void): this; } export interface ESCOption { @@ -153,9 +153,9 @@ export interface GyroMPU6050Option extends GyroGeneralOption { export declare class Gyro { constructor(option: GyroGeneralOption | GyroAnalogOption | GyroMPU6050Option); - on(event: string, cb: () => void): void; - on(event: "change", cb: () => void): void; - on(event: "data", cb: (data: any) => void): void; + on(event: string, cb: () => void): this; + on(event: "change", cb: () => void): this; + on(event: "data", cb: (data: any) => void): this; recalibrate(): void; }