Merge pull request #13372 from DefinitelyTyped/lint_usb

usb: Remove `I` prefix from interface
This commit is contained in:
Andy
2016-12-15 10:54:36 -08:00
committed by GitHub
2 changed files with 7 additions and 7 deletions
+5 -5
View File
@@ -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;
+2 -2
View File
@@ -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);