Skip to content

Commit

Permalink
Added better typing for ScriptCommon.engineType attribute (#2962)
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox authored Nov 13, 2024
1 parent 784d891 commit 5a1e8e3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions packages/adapter/src/lib/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ export interface AdapterClass {
/**
* Extend an object and create it if it might not exist
*
* @deprecated use `adapter.extendObject` without callback instead
* @deprecated use `adapter.extendObject` without a callback instead
*/
extendObjectAsync(
id: string,
objPart: ioBroker.PartialObject,
options?: ioBroker.ExtendObjectOptions,
): ioBroker.SetObjectPromise;
/** Set capabilities of the given executable. Only works on Linux systems. */
/** Set the capabilities of the given executable. Only works on Linux systems. */
setExecutableCapabilities(
execPath: string,
capabilities: string[],
Expand Down Expand Up @@ -1606,7 +1606,7 @@ export class AdapterClass extends EventEmitter {
* ...
* }
* ```
* @param featureName the name of the feature to check
* @returns true/false if the feature is in the list of supported features
*/
Expand Down Expand Up @@ -2596,7 +2596,7 @@ export class AdapterClass extends EventEmitter {
}

/**
* Get the system secret, after retrived once it will be read from cache
* Get the system secret, after retrieved once it will be read from the cache
*/
private async getSystemSecret(): Promise<string> {
if (this._systemSecret !== undefined) {
Expand Down Expand Up @@ -2624,7 +2624,7 @@ export class AdapterClass extends EventEmitter {
): ioBroker.Timeout | undefined;
/**
* Same as setTimeout,
* but it clears the running timers during the unload process
* but it clears the running timers during the unloading process
* does not work after unload has been called
*
* @param cb - timer callback
Expand Down
2 changes: 1 addition & 1 deletion packages/types-dev/objects.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,7 @@ declare global {
interface ScriptCommon extends ObjectCommon {
name: string;
/** Defines the type of the script, e.g., TypeScript/ts, JavaScript/js or Blockly */
engineType: string;
engineType: 'TypeScript/ts' | 'Blockly' | 'Rules' | 'JavaScript/js';
/** The instance id of the instance which executes this script */
engine: string;
/** The source code of this script */
Expand Down

0 comments on commit 5a1e8e3

Please sign in to comment.