mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-07-11 20:50:02 +00:00
Improve getHistory types and make ignoreNull optional
This commit is contained in:
5
types/iobroker/index.d.ts
vendored
5
types/iobroker/index.d.ts
vendored
@@ -900,7 +900,7 @@ declare global {
|
||||
q?: boolean;
|
||||
addID?: boolean;
|
||||
limit?: number;
|
||||
ignoreNull: boolean;
|
||||
ignoreNull?: boolean;
|
||||
sessionId?: any;
|
||||
aggregate?: "minmax" | "min" | "max" | "average" | "total" | "count" | "none";
|
||||
}
|
||||
@@ -1682,7 +1682,8 @@ declare global {
|
||||
type SetStateCallback = (err: string | null, id?: string) => void;
|
||||
type SetStateChangedCallback = (err: string | null, id: string, notChanged: boolean) => void;
|
||||
type DeleteStateCallback = (err: string | null, id?: string) => void;
|
||||
type GetHistoryCallback = (err: string | null, result: Array<(State & { id?: string })>, step: number, sessionId?: string) => void;
|
||||
type GetHistoryResult = Array<(State & { id?: string })>
|
||||
type GetHistoryCallback = (err: string | null, result: GetHistoryResult, step: number, sessionId?: string) => void;
|
||||
|
||||
/** Contains the return values of readDir */
|
||||
interface ReadDirResult {
|
||||
|
||||
@@ -260,6 +260,8 @@ adapter.subscribeForeignStatesAsync("*").catch(handleError);
|
||||
adapter.unsubscribeStatesAsync("*").catch(handleError);
|
||||
adapter.unsubscribeForeignStatesAsync("*").catch(handleError);
|
||||
|
||||
adapter.getHistory("state.id", {}, (err, result: ioBroker.GetHistoryResult) => {});
|
||||
|
||||
// Repro from https://github.com/ioBroker/adapter-core/issues/3
|
||||
const repro1: ioBroker.ObjectChangeHandler = (id, obj) => {
|
||||
if (!obj || !obj.common) return;
|
||||
|
||||
Reference in New Issue
Block a user