mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-05 15:27:05 +00:00
Fix return type of getForeignObjectsAsync
This commit is contained in:
Vendored
+3
-3
@@ -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;
|
||||
|
||||
@@ -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("*");
|
||||
|
||||
Reference in New Issue
Block a user