diff --git a/types/iobroker/index.d.ts b/types/iobroker/index.d.ts index 314d8c8e30..4cfbddc2a2 100644 --- a/types/iobroker/index.d.ts +++ b/types/iobroker/index.d.ts @@ -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>; - getForeignObjectsAsync(pattern: string, type: ObjectType, options?: unknown): Promise>; - getForeignObjectsAsync(pattern: string, type: ObjectType, enums: EnumList, options?: unknown): Promise>; + getForeignObjectsAsync(pattern: string, options?: unknown): Promise>; + getForeignObjectsAsync(pattern: string, type: ObjectType, options?: unknown): Promise>; + getForeignObjectsAsync(pattern: string, type: ObjectType, enums: EnumList, options?: unknown): Promise>; /** 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; diff --git a/types/iobroker/iobroker-tests.ts b/types/iobroker/iobroker-tests.ts index fcdc4d5c9e..2ee7da83d5 100644 --- a/types/iobroker/iobroker-tests.ts +++ b/types/iobroker/iobroker-tests.ts @@ -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("*");