Skip to content

Commit

Permalink
imports
Browse files Browse the repository at this point in the history
  • Loading branch information
foxriver76 committed May 17, 2022
1 parent 3d8285c commit 39b720c
Showing 1 changed file with 10 additions and 20 deletions.
30 changes: 10 additions & 20 deletions packages/adapter/src/lib/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,16 +40,6 @@ import {
ACCESS_USER_READ
} from './constants';
import type { PluginHandlerSettings } from '@iobroker/plugin-base/types';
import {
EnumList,
GetObjectsCallback,
GetObjectsCallbackTyped,
SetObjectCallback,
SetStatePromise,
SettableState,
State,
StateValue
} from 'iobroker';

// keep them outside until we have migrated to TS, else devs can access them
let adapterStates: StatesInRedisClient;
Expand Down Expand Up @@ -237,9 +227,9 @@ interface InternalGetObjectOptions {
interface InternalGetObjectsOptions {
pattern: string;
type?: string;
enums?: EnumList;
enums?: ioBroker.EnumList;
options?: unknown;
callback?: GetObjectsCallbackTyped<any>;
callback?: ioBroker.GetObjectsCallbackTyped<any>;
}

interface AdapterClass {
Expand Down Expand Up @@ -3716,31 +3706,31 @@ class AdapterClass extends EventEmitter {
}

// external signatures
getForeignObjects(pattern: string, callback: GetObjectsCallback): void;
getForeignObjects(pattern: string, options: unknown, callback: GetObjectsCallback): void;
getForeignObjects(pattern: string, callback: ioBroker.GetObjectsCallback): void;
getForeignObjects(pattern: string, options: unknown, callback: ioBroker.GetObjectsCallback): void;
getForeignObjects<T extends ioBroker.ObjectType>(
pattern: string,
type: T,
callback: GetObjectsCallbackTyped<T>
callback: ioBroker.GetObjectsCallbackTyped<T>
): void;
getForeignObjects<T extends ioBroker.ObjectType>(
pattern: string,
type: T,
enums: EnumList,
callback: GetObjectsCallbackTyped<T>
enums: ioBroker.EnumList,
callback: ioBroker.GetObjectsCallbackTyped<T>
): void;
getForeignObjects<T extends ioBroker.ObjectType>(
pattern: string,
type: T,
options: unknown,
callback: GetObjectsCallbackTyped<T>
callback: ioBroker.GetObjectsCallbackTyped<T>
): void;
getForeignObjects<T extends ioBroker.ObjectType>(
pattern: string,
type: T,
enums: EnumList,
enums: ioBroker.EnumList,
options: unknown,
callback: GetObjectsCallbackTyped<T>
callback: ioBroker.GetObjectsCallbackTyped<T>
): void;
/**
* Get objects by pattern, by specific type and resolve their enums.
Expand Down

0 comments on commit 39b720c

Please sign in to comment.