Skip to content

Commit 4e224d8

Browse files
committed
.
1 parent fb0ed43 commit 4e224d8

File tree

4 files changed

+12
-11
lines changed

4 files changed

+12
-11
lines changed

generated/api_pb_service.d.ts

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,13 @@ type DgraphCheckVersion = {
4949
readonly responseType: typeof api_pb.Version
5050
}
5151

52-
export class Dgraph {
53-
static readonly serviceName: string
54-
static readonly Login: DgraphLogin
55-
static readonly Query: DgraphQuery
56-
static readonly Alter: DgraphAlter
57-
static readonly CommitOrAbort: DgraphCommitOrAbort
58-
static readonly CheckVersion: DgraphCheckVersion
52+
export namespace Dgraph {
53+
export const serviceName: string
54+
export const Login: DgraphLogin
55+
export const Query: DgraphQuery
56+
export const Alter: DgraphAlter
57+
export const CommitOrAbort: DgraphCommitOrAbort
58+
export const CheckVersion: DgraphCheckVersion
5959
}
6060

6161
export type ServiceError = {

scripts/run-tests.sh

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,8 @@ function init {
8080
}
8181

8282
# find parent directory of test script
83-
readonly _SRCDIR=$(readlink -f "${BASH_SOURCE[0]%/*}")
83+
readonly _SRCDIR
84+
_SRCDIR=$(readlink -f "${BASH_SOURCE[0]%/*}")
8485
SRCDIR=$(dirname "${_SRCDIR}")
8586

8687
init

src/types.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import { b64ToStr, isBase64, strToB64, strToJson, strToU8, u8ToStr } from "./uti
1010
* Payload represents the return value of an alter operation.
1111
*/
1212
export class Payload extends messages.Payload {
13-
public getData(): unknown {
13+
public getData(): object {
1414
let jsonStr: string
1515
const value = super.getData()
1616
if (value instanceof Uint8Array) {

src/util.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export function errorCode(err: unknown): { valid: boolean; code: number } {
55
if (
66
err === undefined ||
77
typeof err !== "object" ||
8-
!err.hasOwnProperty("code") ||
9-
typeof err.code !== "number"
8+
!Object.prototype.hasOwnProperty.call(err, "code") ||
9+
typeof (err as { code?: unknown }).code !== "number"
1010
) {
1111
return {
1212
valid: false,

0 commit comments

Comments
 (0)