Skip to content

Commit db00c1d

Browse files
committed
Working on typescript
1 parent 7e2525c commit db00c1d

File tree

7 files changed

+435
-347
lines changed

7 files changed

+435
-347
lines changed

src/lib/adapter-config.d.ts

Lines changed: 0 additions & 16 deletions
This file was deleted.

src/lib/mirror.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -252,10 +252,10 @@ export class Mirror {
252252
/**
253253
* Write file to disk, synchron, catch (and print) error.
254254
*
255-
* @param {string} id of script
256-
* @returns {boolean} true if write was successful
255+
* @param id of script
256+
* @returns true if write was successful
257257
*/
258-
private _writeFile(id) {
258+
private _writeFile(id: string): boolean {
259259
const diskListEntry = this.diskList[id];
260260
try {
261261
//check if the directory exists and create if not:

src/lib/protectFs.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -523,9 +523,9 @@ export default class ProtectFs {
523523
return nodeFS.rm.apply(this, arguments); // function rm(path, options, callback) {
524524
}
525525

526-
rmSync() {
527-
this.#checkProtected(arguments[0], false);
528-
return nodeFS.rmSync.apply(this, arguments); // function rmSync(path, options) {
526+
rmSync(path: PathLike, options?: RmOptions): void {
527+
this.#checkProtected(path, false);
528+
return nodeFS.rmSync.call(this, path, options); // function rmSync(path, options) {
529529
}
530530

531531
rmdir() {

src/lib/sandbox.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2865,10 +2865,9 @@ export function sandBox(
28652865

28662866
sandbox.verbose && sandbox.log(`getState(id=${id}, timerId=${timers[id]}) => not found`, 'info');
28672867

2868-
context.logWithLineInfo &&
2869-
context.logWithLineInfo.warn(
2870-
`getState "${id}" not found (3)${states[id] !== undefined ? ` states[id]=${states[id]}` : ''}`,
2871-
); ///xxx
2868+
context.logWithLineInfo?.warn(
2869+
`getState "${id}" not found (3)${states[id] !== undefined ? ` states[id]=${states[id]}` : ''}`,
2870+
); ///xxx
28722871
return { val: null, notExist: true } as ioBroker.State & { notExist?: true };
28732872
}
28742873
}

src/lib/scheduler.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -160,7 +160,6 @@ export class Scheduler {
160160
private log: {
161161
debug: (text: string) => void;
162162
info: (text: string) => void;
163-
log: (text: string) => void;
164163
warn: (text: string) => void;
165164
error: (text: string) => void;
166165
silly: (text: string) => void;
@@ -175,7 +174,6 @@ export class Scheduler {
175174
log: {
176175
debug: (text: string) => void;
177176
info: (text: string) => void;
178-
log: (text: string) => void;
179177
warn: (text: string) => void;
180178
error: (text: string) => void;
181179
silly: (text: string) => void;

0 commit comments

Comments
 (0)