@iobroker/adapter-core
Advanced tools
Comparing version 2.2.0 to 2.2.1
@@ -6,26 +6,7 @@ /// <reference types="iobroker" /> | ||
export declare function getConfig(): Record<string, any>; | ||
/** | ||
* This type is used to include and exclude the states and objects cache from the adaptert type definition depending on the creation options | ||
*/ | ||
export declare type AdapterInstance = Omit<ioBroker.Adapter, "oObjects" | "oStates">; | ||
declare type AdapterInstanceType<T extends ioBroker.AdapterOptions> = T extends { | ||
objects: true; | ||
states: true; | ||
} ? AdapterInstance & { | ||
oObjects: Exclude<ioBroker.Adapter["oObjects"], undefined>; | ||
oStates: Exclude<ioBroker.Adapter["oStates"], undefined>; | ||
} : T extends { | ||
objects: true; | ||
} ? AdapterInstance & { | ||
oObjects: Exclude<ioBroker.Adapter["oObjects"], undefined>; | ||
} : T extends { | ||
states: true; | ||
} ? AdapterInstance & { | ||
oStates: Exclude<ioBroker.Adapter["oStates"], undefined>; | ||
} : AdapterInstance; | ||
interface AdapterConstructor { | ||
new (adapterName: string): AdapterInstance; | ||
new <T extends ioBroker.AdapterOptions>(adapterOptions: T): AdapterInstanceType<T>; | ||
(adapterName: string): AdapterInstance; | ||
<T extends ioBroker.AdapterOptions>(adapterOptions: ioBroker.AdapterOptions): AdapterInstanceType<T>; | ||
new (adapterName: string): ioBroker.Adapter; | ||
new (adapterOptions: ioBroker.AdapterOptions): ioBroker.Adapter; | ||
(adapterName: string): ioBroker.Adapter; | ||
(adapterOptions: ioBroker.AdapterOptions): ioBroker.Adapter; | ||
} | ||
@@ -32,0 +13,0 @@ /** Creates a new adapter instance */ |
{ | ||
"name": "@iobroker/adapter-core", | ||
"version": "2.2.0", | ||
"version": "2.2.1", | ||
"description": "Core module to be used in ioBroker adapters. Acts as the bridge to js-controller.", | ||
@@ -5,0 +5,0 @@ "author": { |
@@ -78,3 +78,4 @@ # Adapter-Core | ||
### v2.2.0 (2020-01-27) | ||
### v2.2.1 (2020-01-27) | ||
- (AlCalzone) Included typings for the objects and states cache in the adapter class | ||
@@ -81,0 +82,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
116
13604
167