Skip to content

Commit 93db566

Browse files
[TYPING] Added typing for findForeignObject (#3050)
* Added typing for `findForeignObject` * Changed comment
1 parent 607cdd9 commit 93db566

File tree

2 files changed

+10
-3
lines changed

2 files changed

+10
-3
lines changed

packages/adapter/src/lib/adapter/adapter.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4459,7 +4459,14 @@ export class AdapterClass extends EventEmitter {
44594459
findForeignObject(
44604460
idOrName: string,
44614461
type: ioBroker.CommonType | null,
4462-
options: { user?: `system.user.${string}`; language?: ioBroker.Languages },
4462+
options: {
4463+
user?: `system.user.${string}`;
4464+
language?: ioBroker.Languages;
4465+
/** This can be set to true to disable permission checks if they were already checked otherwise. Use it with caution! */
4466+
checked?: boolean;
4467+
/** Search only within the states, that belongs to this user */
4468+
limitToOwnerRights?: boolean;
4469+
},
44634470
callback: ioBroker.FindObjectCallback,
44644471
): void;
44654472

packages/cli/src/lib/setup/setupUsers.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -334,7 +334,7 @@ export class Users {
334334
if (!isExisting) {
335335
return tools.maybeCallbackWithError(callback, `User "${username}" does not exist.`);
336336
}
337-
// Check group
337+
// Check a group
338338
if (!password) {
339339
prompt.message = '';
340340
prompt.delimiter = '';
@@ -356,7 +356,7 @@ export class Users {
356356
} as const satisfies prompt.Schema;
357357
prompt.start();
358358

359-
prompt.get<SchemaPropsToString<typeof schema>>(schema, (err, result) => {
359+
prompt.get<SchemaPropsToString<typeof schema>>(schema, (_err: Error | null, result): void => {
360360
if (result) {
361361
if (result.password !== result.repeatPassword) {
362362
return tools.maybeCallbackWithError(callback, 'Passwords are not identical!');

0 commit comments

Comments
 (0)