Skip to content

Commit 4f70d1d

Browse files
committed
Fix tslint errors
1 parent 6cbc81f commit 4f70d1d

File tree

2 files changed

+10
-16
lines changed

2 files changed

+10
-16
lines changed

src/client.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -96,8 +96,7 @@ export class DgraphClient {
9696
}
9797

9898
// isJwtExpired returns true if the error indicates that the jwt has expired.
99-
export function isJwtExpired(err: any): Boolean {
100-
// tslint:disable-line no-any
99+
export function isJwtExpired(err: any): Boolean { // tslint:disable-line no-any
101100
if (!err) {
102101
return false;
103102
}

src/util.ts

Lines changed: 9 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import * as grpc from "@grpc/grpc-js";
22
import * as jspb from "google-protobuf";
33

4-
export function errorCode(err: any): { valid: boolean; code: number } {
5-
// tslint:disable-line no-any
4+
export function errorCode(err: any): { valid: boolean; code: number } { // tslint:disable-line no-any
65
if (
76
err === undefined ||
87
typeof err !== "object" ||
@@ -21,14 +20,12 @@ export function errorCode(err: any): { valid: boolean; code: number } {
2120
};
2221
}
2322

24-
export function isAbortedError(err: any): boolean {
25-
// tslint:disable-line no-any
23+
export function isAbortedError(err: any): boolean { // tslint:disable-line no-any
2624
const ec = errorCode(err);
2725
return ec.valid && ec.code === grpc.status.ABORTED;
2826
}
2927

30-
export function isConflictError(err: any): boolean {
31-
// tslint:disable-line no-any
28+
export function isConflictError(err: any): boolean { // tslint:disable-line no-any
3229
const ec = errorCode(err);
3330
return (
3431
ec.valid &&
@@ -37,8 +34,7 @@ export function isConflictError(err: any): boolean {
3734
);
3835
}
3936

40-
export function isUnauthenticatedError(err: any): boolean {
41-
// tslint:disable-line no-any
37+
export function isUnauthenticatedError(err: any): boolean { // tslint:disable-line no-any
4238
const ec = errorCode(err);
4339
return ec.valid && ec.code === grpc.status.UNAUTHENTICATED;
4440
}
@@ -52,14 +48,14 @@ export function promisify1<A, T>(
5248
return new Promise(
5349
(
5450
resolve: (value?: T | PromiseLike<T>) => void,
55-
reject: (reason?: any) => void,
51+
reject: (reason?: any) => void // tslint:disable-line no-any
5652
): void => {
5753
f.call(thisContext, arg, (err?: Error, result?: T): void =>
5854
err !== undefined && err !== null
5955
? reject(err)
60-
: resolve(result),
56+
: resolve(result)
6157
);
62-
},
58+
}
6359
);
6460
};
6561
}
@@ -73,7 +69,7 @@ export function promisify3<A, B, C, T>(
7369
return new Promise(
7470
(
7571
resolve: (value?: T | PromiseLike<T>) => void,
76-
reject: (reason?: any) => void,
72+
reject: (reason?: any) => void, // tslint:disable-line no-any
7773
): void => {
7874
f.call(
7975
thisContext,
@@ -118,8 +114,7 @@ export function u8ToStr(arr: Uint8Array): string {
118114
return buf.toString();
119115
}
120116

121-
export function strToJson(jsonStr: string): any {
122-
// tslint:disable-line no-any
117+
export function strToJson(jsonStr: string): any { // tslint:disable-line no-any
123118
try {
124119
return JSON.parse(jsonStr);
125120
} catch (e) {

0 commit comments

Comments
 (0)