Skip to content
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

Incorrect type in @types/dbus package #71006

Open
benfrancis opened this issue Oct 25, 2024 · 2 comments
Open

Incorrect type in @types/dbus package #71006

benfrancis opened this issue Oct 25, 2024 · 2 comments

Comments

@benfrancis
Copy link

https://github.com/DefinitelyTyped/DefinitelyTyped/blob/286e356cfaf3ad52bcd2da1e9bfc79f16b664a9b/types/dbus/index.d.ts#L30C71-L30C77

getProperty(name: string, callback: (err: Error | null, name: stringvalue: any) => void): void;

@mithelan
Copy link

Do we need to update the parameters from name to value?

@benfrancis
Copy link
Author

benfrancis commented Oct 26, 2024

Yes, I think the confusion probably comes from the README which lists (err, name) as the arguments to the callback, but the prose of the text correctly states that it actually returns the value, not the name of the property (which is hopefully obvious from the name of the function).

Edit: Just to be clear, the first argument of getProperty() is the name, the second argument of the callback function is the value

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants