Skip to content

[TYPING] Added typing for findForeignObject #3050

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 5, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion packages/adapter/src/lib/adapter/adapter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4459,7 +4459,14 @@ export class AdapterClass extends EventEmitter {
findForeignObject(
idOrName: string,
type: ioBroker.CommonType | null,
options: { user?: `system.user.${string}`; language?: ioBroker.Languages },
options: {
user?: `system.user.${string}`;
language?: ioBroker.Languages;
/** This can be set to true to disable permission checks if they were already checked otherwise. Use it with caution! */
checked?: boolean;
/** Search only within the states, that belongs to this user */
limitToOwnerRights?: boolean;
},
callback: ioBroker.FindObjectCallback,
): void;

Expand Down
4 changes: 2 additions & 2 deletions packages/cli/src/lib/setup/setupUsers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -334,7 +334,7 @@ export class Users {
if (!isExisting) {
return tools.maybeCallbackWithError(callback, `User "${username}" does not exist.`);
}
// Check group
// Check a group
if (!password) {
prompt.message = '';
prompt.delimiter = '';
Expand All @@ -356,7 +356,7 @@ export class Users {
} as const satisfies prompt.Schema;
prompt.start();

prompt.get<SchemaPropsToString<typeof schema>>(schema, (err, result) => {
prompt.get<SchemaPropsToString<typeof schema>>(schema, (_err: Error | null, result): void => {
if (result) {
if (result.password !== result.repeatPassword) {
return tools.maybeCallbackWithError(callback, 'Passwords are not identical!');
Expand Down
Loading