Skip to content

Commit 1800cf6

Browse files
authored
🤖 Merge PR DefinitelyTyped#71966 [@types/dbus] fix: fix incorrect callback parameter name and type by @shubham88fru
1 parent d6556b5 commit 1800cf6

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

‎types/dbus/dbus-tests.ts‎

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,15 @@ dbus.getInterface<Adapter>("org.bluez", "/org/bluez/hci0", "org.bluez.Adapter1",
1515
iface.StartDiscovery(() => {});
1616
}
1717
});
18+
19+
iface.setProperty("System", 32, err => {
20+
if (!err) {
21+
iface.StartDiscovery(() => {});
22+
}
23+
})
24+
25+
iface.getProperty("Powered", (err: Error | null, value: boolean): void => {});
26+
iface.getProperty("System", (err: Error | null, value: number): void => {});
1827
}
1928
});
2029

‎types/dbus/index.d.ts‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ declare namespace DBus {
2727
objectPath: string;
2828
interfaceName: string;
2929

30-
getProperty(name: string, callback: (err: Error | null, name: string) => void): void;
30+
getProperty(name: string, callback: (err: Error | null, value: any) => void): void;
3131
setProperty(name: string, value: any, callback: (err: Error | null) => void): void;
3232
getProperties(callback: (err: Error | null, properties: { [name: string]: any }) => void): void;
3333
/**

0 commit comments

Comments
 (0)