1 |
|
2 | export declare const controllerDir: string;
|
3 |
|
4 | export declare function getConfig(): Record<string, any>;
|
5 |
|
6 |
|
7 |
|
8 | export interface AdapterInstance<HasObjectsCache extends boolean | undefined = undefined, HasStatesCache extends boolean | undefined = undefined> extends ioBroker.Adapter {
|
9 |
|
10 | oObjects: HasObjectsCache extends true ? Exclude<ioBroker.Adapter['oObjects'], undefined> : undefined;
|
11 |
|
12 | oStates: HasStatesCache extends true ? Exclude<ioBroker.Adapter['oStates'], undefined> : undefined;
|
13 | }
|
14 |
|
15 | export type AdapterOptions<HasObjectsCache extends boolean | undefined = undefined, HasStatesCache extends boolean | undefined = undefined> = Omit<ioBroker.AdapterOptions, 'objects' | 'states'> & (true extends HasObjectsCache ? {
|
16 | objects: true;
|
17 | } : {
|
18 | objects?: HasObjectsCache;
|
19 | }) & (true extends HasStatesCache ? {
|
20 | states: true;
|
21 | } : {
|
22 | states?: HasStatesCache;
|
23 | });
|
24 |
|
25 | interface AdapterConstructor {
|
26 | new <HasObjectsCache extends boolean | undefined = undefined, HasStatesCache extends boolean | undefined = undefined>(adapterOptions: AdapterOptions<HasObjectsCache, HasStatesCache> | string): AdapterInstance<HasObjectsCache, HasStatesCache>;
|
27 | <HasObjectsCache extends boolean | undefined = undefined, HasStatesCache extends boolean | undefined = undefined>(adapterOptions: AdapterOptions<HasObjectsCache, HasStatesCache> | string): AdapterInstance<HasObjectsCache, HasStatesCache>;
|
28 | }
|
29 |
|
30 | export declare const adapter: AdapterConstructor;
|
31 |
|
32 | export declare const Adapter: AdapterConstructor;
|
33 | export {};
|