Skip to content

Commit 5a1e8e3

Browse files
Added better typing for ScriptCommon.engineType attribute (#2962)
1 parent 784d891 commit 5a1e8e3

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

Diff for: packages/adapter/src/lib/adapter/adapter.ts

+5-5
Original file line numberDiff line numberDiff line change
@@ -161,14 +161,14 @@ export interface AdapterClass {
161161
/**
162162
* Extend an object and create it if it might not exist
163163
*
164-
* @deprecated use `adapter.extendObject` without callback instead
164+
* @deprecated use `adapter.extendObject` without a callback instead
165165
*/
166166
extendObjectAsync(
167167
id: string,
168168
objPart: ioBroker.PartialObject,
169169
options?: ioBroker.ExtendObjectOptions,
170170
): ioBroker.SetObjectPromise;
171-
/** Set capabilities of the given executable. Only works on Linux systems. */
171+
/** Set the capabilities of the given executable. Only works on Linux systems. */
172172
setExecutableCapabilities(
173173
execPath: string,
174174
capabilities: string[],
@@ -1606,7 +1606,7 @@ export class AdapterClass extends EventEmitter {
16061606
* ...
16071607
* }
16081608
* ```
1609-
1609+
16101610
* @param featureName the name of the feature to check
16111611
* @returns true/false if the feature is in the list of supported features
16121612
*/
@@ -2596,7 +2596,7 @@ export class AdapterClass extends EventEmitter {
25962596
}
25972597

25982598
/**
2599-
* Get the system secret, after retrived once it will be read from cache
2599+
* Get the system secret, after retrieved once it will be read from the cache
26002600
*/
26012601
private async getSystemSecret(): Promise<string> {
26022602
if (this._systemSecret !== undefined) {
@@ -2624,7 +2624,7 @@ export class AdapterClass extends EventEmitter {
26242624
): ioBroker.Timeout | undefined;
26252625
/**
26262626
* Same as setTimeout,
2627-
* but it clears the running timers during the unload process
2627+
* but it clears the running timers during the unloading process
26282628
* does not work after unload has been called
26292629
*
26302630
* @param cb - timer callback

Diff for: packages/types-dev/objects.d.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -453,7 +453,7 @@ declare global {
453453
interface ScriptCommon extends ObjectCommon {
454454
name: string;
455455
/** Defines the type of the script, e.g., TypeScript/ts, JavaScript/js or Blockly */
456-
engineType: string;
456+
engineType: 'TypeScript/ts' | 'Blockly' | 'Rules' | 'JavaScript/js';
457457
/** The instance id of the instance which executes this script */
458458
engine: string;
459459
/** The source code of this script */

0 commit comments

Comments
 (0)