Skip to content

Commit

Permalink
Merge 7826f89 into 6df7ecb
Browse files Browse the repository at this point in the history
  • Loading branch information
Supereg committed Apr 30, 2023
2 parents 6df7ecb + 7826f89 commit e7146e7
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
5 changes: 3 additions & 2 deletions src/lib/Advertiser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
/// <reference path="../../@types/bonjour-hap.d.ts" />
import ciao, { CiaoService, MDNSServerOptions, Responder, ServiceEvent, ServiceTxt, ServiceType } from "@homebridge/ciao";
import { InterfaceName, IPAddress } from "@homebridge/ciao/lib/NetworkManager";
import dbus, { DBusInterface, InvokeError, MessageBus } from "@homebridge/dbus-native";
import dbus, { DBusInterface, MessageBus } from "@homebridge/dbus-native";
import assert from "assert";
import bonjour, { BonjourHAP, BonjourHAPService, MulticastOptions } from "bonjour-hap";
import crypto from "crypto";
Expand Down Expand Up @@ -303,7 +303,8 @@ function messageBusConnectionResult(bus: MessageBus): Promise<void> {
export class DBusInvokeError extends Error {
readonly errorName: string;

constructor(errorObject: InvokeError) {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
constructor(errorObject: { name: string, message: any }) {
super();

Object.setPrototypeOf(this, DBusInvokeError.prototype);
Expand Down
8 changes: 1 addition & 7 deletions src/types/dbus-native.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,11 @@ declare module "@homebridge/dbus-native" {

function systemBus(): MessageBus;

export class InvokeError {
name: string;
// eslint-disable-next-line @typescript-eslint/no-explicit-any
message: any;
}

export class MessageBus {
connection: BusConnection;

// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types,@typescript-eslint/no-explicit-any
public invoke(message: any, callback: (error: InvokeError | undefined, value: any) => void): void;
public invoke(message: any, callback: (error: { name: string, message: any } | undefined, value: any) => void): void;

public getService(name: string): DBusService;
}
Expand Down

0 comments on commit e7146e7

Please sign in to comment.