Skip to content

Commit a32b7b1

Browse files
Typing for getHistoryAsync (#3021)
1 parent b6159ad commit a32b7b1

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

packages/adapter/src/lib/adapter/adapter.ts

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -284,8 +284,15 @@ export interface AdapterClass {
284284
/** Checks if a file exists in the DB */
285285
fileExistsAsync(adapterName: string | null, path: string, options?: unknown): Promise<boolean>;
286286

287-
// TODO correct types needed
288-
getHistoryAsync(...args: any[]): Promise<any>;
287+
/** Read historian data for states of any instance or system state. */
288+
getHistoryAsync(
289+
id: string,
290+
options?: ioBroker.GetHistoryOptions,
291+
): Promise<{
292+
result?: ioBroker.GetHistoryResult;
293+
step?: number;
294+
sessionId?: number;
295+
}>;
289296
/** Deletes a state from the states DB, but not the associated object. Consider using deleteState instead */
290297
delStateAsync(id: string, options?: unknown): Promise<void>;
291298
/** Deletes a state from the states DB, but not the associated object */

0 commit comments

Comments
 (0)