@iobroker/types 5.0.8 → 5.0.9-alpha.0-20230719-7a194a15

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/build/types.d.ts +11 -3
  2. package/package.json +2 -2
package/build/types.d.ts CHANGED
@@ -1,6 +1,7 @@
1
1
  /// <reference types="node" />
2
2
 
3
3
  import { EventEmitter } from 'events';
4
+ import type Winston from 'winston';
4
5
 
5
6
  /**
6
7
  * Polyfill to allow calling without `new`
@@ -307,7 +308,8 @@ export declare class AdapterClass extends EventEmitter {
307
308
  private readonly _timers;
308
309
  private readonly _intervals;
309
310
  private readonly _delays;
310
- log?: Log;
311
+ /** For ease of use the log property is always defined, however it is only available after `ready` has been called. */
312
+ log: Log;
311
313
  performStrictObjectChecks: boolean;
312
314
  private readonly _logger;
313
315
  private _restartScheduleJob;
@@ -361,7 +363,7 @@ export declare class AdapterClass extends EventEmitter {
361
363
  latitude?: number;
362
364
  private _defaultObjs?;
363
365
  private _aliasObjectsSubscribed?;
364
- config?: Record<string, any>;
366
+ config: ioBroker.AdapterConfig;
365
367
  host?: string;
366
368
  common?: ioBroker.InstanceCommon;
367
369
  private mboxSubscribed?;
@@ -839,6 +841,12 @@ export declare interface GetUserGroupsOptions {
839
841
  [other: string]: any;
840
842
  }
841
843
 
844
+ /**
845
+ * The internal adapter config type should only be used to access config properties which are set by the adapter developers.
846
+ * Only use it like `this.config as InternalAdapterConfig`
847
+ */
848
+ export declare type InternalAdapterConfig = Record<string, unknown>;
849
+
842
850
  export declare interface InternalAddChannelToEnumOptions {
843
851
  enumName: string;
844
852
  addTo: string;
@@ -1149,7 +1157,7 @@ declare class Log {
1149
1157
  * @param level The log level
1150
1158
  * @param logger logger instance
1151
1159
  */
1152
- constructor(namespaceLog: string, level: string, logger: any);
1160
+ constructor(namespaceLog: string, level: string, logger: Winston.Logger);
1153
1161
  silly(msg: string): void;
1154
1162
  debug(msg: string): void;
1155
1163
  info(msg: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@iobroker/types",
3
- "version": "5.0.8",
3
+ "version": "5.0.9-alpha.0-20230719-7a194a15",
4
4
  "engines": {
5
5
  "node": ">=12.0.0"
6
6
  },
@@ -41,5 +41,5 @@
41
41
  ]
42
42
  }
43
43
  },
44
- "gitHead": "473ac3cb6de950e583e17971320044acd8dad502"
44
+ "gitHead": "93e4785024624f3b8fb49de5696a32c90e659bf5"
45
45
  }