ndn-js: use tslint:disable comments

This commit is contained in:
Junxiao Shi
2019-02-20 16:06:58 -05:00
parent d819402985
commit 0f0b8fa5a3
5 changed files with 8 additions and 7 deletions

View File

@@ -1,8 +1,7 @@
export class Blob {
constructor(value?: Blob);
constructor(value: Buffer, copy?: boolean);
constructor(value: number[]);
constructor(value: string);
constructor(value: number[]|string);
buf(): Buffer;
equals(other: Blob): boolean;

View File

@@ -29,6 +29,7 @@ export class KeyChain {
sign(data: Data, params: SigningInfo, onComplete?: (data: Data) => any, onError?: (err: any) => any): void;
sign(interest: Interest, params: SigningInfo, onComplete?: (interest: Interest) => any, onError?: (err: any) => any): void;
signWithSha256(data: Data): void;
// tslint:disable-next-line unified-signatures
signWithSha256(interest: Interest): void;
}

View File

@@ -54,10 +54,12 @@ export namespace Name {
export class Name {
constructor(components?: Array<Name.Component|Uint8Array>);
constructor(uri: string);
// tslint:disable-next-line unified-signatures
constructor(name: Name);
append(value: number[]|ArrayBuffer|Uint8Array|string|Blob, type?: ComponentType, otherTypeCode?: number): Name;
append(component: Name.Component): Name;
// tslint:disable-next-line unified-signatures
append(name: Name): Name;
appendImplicitSha256Digest(digest: Blob): Name;
appendParametersSha256Digest(digest: Blob): Name;

View File

@@ -1,7 +1,9 @@
// tslint:disable-next-line no-empty-interface
export interface Transport {
}
export namespace Transport {
// tslint:disable-next-line no-empty-interface
interface ConnectionInfo {
}
}
@@ -34,6 +36,7 @@ export class WebSocketTransport implements Transport {
export namespace WebSocketTransport {
class ConnectionInfo implements Transport.ConnectionInfo {
// tslint:disable-next-line unified-signatures
constructor(host: string, port: number);
constructor(uri: string);
equals(other: ConnectionInfo): boolean;

View File

@@ -1,7 +1,3 @@
{
"extends": "dtslint/dtslint.json",
"rules": {
"no-empty-interface": false,
"unified-signatures": false
}
"extends": "dtslint/dtslint.json"
}