diff --git a/usb/index.d.ts b/usb/index.d.ts index da2cce8b96..4075023650 100644 --- a/usb/index.d.ts +++ b/usb/index.d.ts @@ -57,7 +57,7 @@ export class ConfigDescriptor { export class Interface { descriptor: InterfaceDescriptor; - endpoints: IEndpoint[]; + endpoints: Endpoint[]; constructor(device: Device, id: number); claim(): void; release(closeEndpoints?: (err?: string) => void, cb?: (err?: string) => void): void; @@ -65,7 +65,7 @@ export class Interface { detachKernelDriver(): number; attachKernelDriver(): number; setAltSetting(altSetting: number, cb: (err?: string) => void): void; - endpoint(addr: number): IEndpoint; + endpoint(addr: number): Endpoint; } export class InterfaceDescriptor { @@ -81,14 +81,14 @@ export class InterfaceDescriptor { extra: Buffer; } -interface IEndpoint { +interface Endpoint { direction: string; transferType: number; timeout: number; descriptor: EndpointDescriptor; } -export class InEndpoint implements IEndpoint { +export class InEndpoint implements Endpoint { direction: string; transferType: number; timeout: number; @@ -99,7 +99,7 @@ export class InEndpoint implements IEndpoint { stopPoll(cb: () => void): void; } -export class OutEndpoint implements IEndpoint { +export class OutEndpoint implements Endpoint { direction: string; transferType: number; timeout: number; diff --git a/usb/usb-tests.ts b/usb/usb-tests.ts index 85da346172..f1963307fc 100644 --- a/usb/usb-tests.ts +++ b/usb/usb-tests.ts @@ -72,8 +72,8 @@ endpointDesc.bInterval = 1; endpointDesc.bRefresh = 1; endpointDesc.bSynchAddress = 1; -const ifaceInEndpoint: usb.IEndpoint = iface.endpoint(1) as usb.InEndpoint; -const ifaceOutEndpoint: usb.IEndpoint = iface.endpoint(1) as usb.OutEndpoint; +const ifaceInEndpoint: usb.Endpoint = iface.endpoint(1) as usb.InEndpoint; +const ifaceOutEndpoint: usb.Endpoint = iface.endpoint(1) as usb.OutEndpoint; const inEndpoint: usb.InEndpoint = new usb.InEndpoint(device, endpointDesc);