From 1465d62d6e1eb5eecde9aae43820b51a03c03b42 Mon Sep 17 00:00:00 2001 From: Matt Steele Date: Sat, 3 Mar 2018 11:37:51 -0600 Subject: [PATCH 1/2] Update pin.read callback See http://johnny-five.io/api/pin/ --- types/johnny-five/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/johnny-five/index.d.ts b/types/johnny-five/index.d.ts index b8c108f63b..0bd9f75a31 100644 --- a/types/johnny-five/index.d.ts +++ b/types/johnny-five/index.d.ts @@ -602,7 +602,7 @@ export declare class Pin { high(): void; low(): void; write(value: number): void; - read(cb: (value: number) => void): void; + read(cb: (error: Error, value: number) => void): void; on(event: string, cb: () => void): this; on(event: "high", cb: () => void): this; on(event: "low", cb: () => void): this; From b26647b7ca4a76cef39acfb757b20dda233d8b5e Mon Sep 17 00:00:00 2001 From: Matt Steele Date: Sat, 3 Mar 2018 11:49:02 -0600 Subject: [PATCH 2/2] Update Ping.read() callback --- types/johnny-five/index.d.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/types/johnny-five/index.d.ts b/types/johnny-five/index.d.ts index 0bd9f75a31..297069f0f1 100644 --- a/types/johnny-five/index.d.ts +++ b/types/johnny-five/index.d.ts @@ -597,7 +597,7 @@ export declare class Pin { mode: number; static write(pin: number, value: number): void; - static read(pin: number, cb: (data: number) => void): void; + static read(pin: number, cb: (error: Error, data: number) => void): void; query(cb: (pin: PinState) => void): void; high(): void; low(): void;