mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-03-29 08:58:23 +08:00
Added missing return type to on() methods. (johnny-five) (#13553)
This commit is contained in:
12
johnny-five/index.d.ts
vendored
12
johnny-five/index.d.ts
vendored
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user