Fix return type of getForeignObjectsAsync

This commit is contained in:
dominic.griesel
2019-01-02 12:47:42 +01:00
parent ddb5f8dd22
commit 0f03ece7f9
2 changed files with 6 additions and 3 deletions
+3 -3
View File
@@ -1125,9 +1125,9 @@ declare global {
getForeignObjects(pattern: string, type: ObjectType, enums: EnumList, options: unknown, callback: GetObjectsCallback): void;
// tslint:enable:unified-signatures
/** Get foreign objects by pattern, by specific type and resolve their enums. */
getForeignObjectsAsync(pattern: string, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectCallback>>;
getForeignObjectsAsync(pattern: string, type: ObjectType, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectCallback>>;
getForeignObjectsAsync(pattern: string, type: ObjectType, enums: EnumList, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectCallback>>;
getForeignObjectsAsync(pattern: string, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectsCallback>>;
getForeignObjectsAsync(pattern: string, type: ObjectType, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectsCallback>>;
getForeignObjectsAsync(pattern: string, type: ObjectType, enums: EnumList, options?: unknown): Promise<CallbackReturnTypeOf<GetObjectsCallback>>;
/** Creates or overwrites an object (which might not belong to this adapter) in the object db */
setForeignObject(id: string, obj: ioBroker.SettableObject, callback?: SetObjectCallback): void;
setForeignObject(id: string, obj: ioBroker.SettableObject, options: unknown, callback?: SetObjectCallback): void;
+3
View File
@@ -170,6 +170,9 @@ adapter.getForeignObject("obj.id", (err, obj) => { });
adapter.getObjectAsync("obj.id").then(obj => obj._id.toLowerCase());
adapter.getForeignObjectAsync("obj.id").then(obj => obj._id.toLowerCase());
adapter.getForeignObjects("*", (err, objs) => { objs["foo"]._id.toLowerCase(); })
adapter.getForeignObjectsAsync("*").then(objs => objs["foo"]._id.toLowerCase());
adapter.subscribeObjects("*");
adapter.subscribeStates("*");
adapter.subscribeForeignObjects("*");