Skip to content

Commit

Permalink
Working on typescript
Browse files Browse the repository at this point in the history
  • Loading branch information
GermanBluefox committed Nov 13, 2024
1 parent 7e2525c commit db00c1d
Show file tree
Hide file tree
Showing 7 changed files with 435 additions and 347 deletions.
16 changes: 0 additions & 16 deletions src/lib/adapter-config.d.ts

This file was deleted.

6 changes: 3 additions & 3 deletions src/lib/mirror.ts
Original file line number Diff line number Diff line change
Expand Up @@ -252,10 +252,10 @@ export class Mirror {
/**
* Write file to disk, synchron, catch (and print) error.
*
* @param {string} id of script
* @returns {boolean} true if write was successful
* @param id of script
* @returns true if write was successful
*/
private _writeFile(id) {
private _writeFile(id: string): boolean {
const diskListEntry = this.diskList[id];
try {
//check if the directory exists and create if not:
Expand Down
6 changes: 3 additions & 3 deletions src/lib/protectFs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -523,9 +523,9 @@ export default class ProtectFs {
return nodeFS.rm.apply(this, arguments); // function rm(path, options, callback) {
}

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

rmdir() {
Expand Down
7 changes: 3 additions & 4 deletions src/lib/sandbox.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2865,10 +2865,9 @@ export function sandBox(

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

context.logWithLineInfo &&
context.logWithLineInfo.warn(
`getState "${id}" not found (3)${states[id] !== undefined ? ` states[id]=${states[id]}` : ''}`,
); ///xxx
context.logWithLineInfo?.warn(
`getState "${id}" not found (3)${states[id] !== undefined ? ` states[id]=${states[id]}` : ''}`,
); ///xxx
return { val: null, notExist: true } as ioBroker.State & { notExist?: true };
}
}
Expand Down
2 changes: 0 additions & 2 deletions src/lib/scheduler.ts
Original file line number Diff line number Diff line change
Expand Up @@ -160,7 +160,6 @@ export class Scheduler {
private log: {
debug: (text: string) => void;
info: (text: string) => void;
log: (text: string) => void;
warn: (text: string) => void;
error: (text: string) => void;
silly: (text: string) => void;
Expand All @@ -175,7 +174,6 @@ export class Scheduler {
log: {
debug: (text: string) => void;
info: (text: string) => void;
log: (text: string) => void;
warn: (text: string) => void;
error: (text: string) => void;
silly: (text: string) => void;
Expand Down
Loading

0 comments on commit db00c1d

Please sign in to comment.