Skip to content

Commit

Permalink
chore: pass "deno lint" (#98)
Browse files Browse the repository at this point in the history
  • Loading branch information
uki00a authored Jun 23, 2020
1 parent efdc2e7 commit dd1d035
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
6 changes: 4 additions & 2 deletions io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -137,10 +137,12 @@ export async function readBulkReply(reader: BufReader): Promise<Bulk> {
);
}

export async function readArrayReply(reader: BufReader): Promise<any[]> {
export async function readArrayReply(
reader: BufReader,
): Promise<ConditionalArray> {
const line = await readLine(reader);
const argCount = parseInt(line.substr(1, line.length - 3));
const result: any[] = [];
const result: ConditionalArray = [];
for (let i = 0; i < argCount; i++) {
const res = await reader.peek(1);
if (res === null) {
Expand Down
4 changes: 2 additions & 2 deletions pipeline_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ test({
const tx2 = redis.tx();
const tx3 = redis.tx();
await redis.del("key");
await Promise.all<any>([
await Promise.all<unknown>([
tx1.get("key"),
tx1.incr("key"),
tx1.incr("key"),
Expand Down Expand Up @@ -90,7 +90,7 @@ test({
{
const redis = await connect(addr);
const tx = redis.pipeline();
let promises: Promise<any>[] = [];
let promises: Promise<unknown>[] = [];
await redis.del("a", "b", "c");
for (const key of ["a", "b", "c"]) {
promises.push(tx.set(key, key));
Expand Down
1 change: 1 addition & 0 deletions pubsub_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,7 @@ test({
const redis = await connect(addr);
const sub = await redis.subscribe("test");
const subscriptionPromise = (async () => {
// deno-lint-ignore no-empty
for await (const _ of sub.receive()) {}
})();
redis.close();
Expand Down
2 changes: 2 additions & 0 deletions redis.ts
Original file line number Diff line number Diff line change
Expand Up @@ -404,6 +404,7 @@ class RedisImpl implements RedisCommands {
return this.execStatusReply("FLUSHDB", ...args);
}

// deno-lint-ignore no-explicit-any
geoadd(key: string, ...args: any[]) {
const _args = [];
if (Array.isArray(args[0])) {
Expand Down Expand Up @@ -1199,6 +1200,7 @@ class RedisImpl implements RedisCommands {
return this.execStatusReply("WATCH", key, ...keys);
}

// deno-lint-ignore no-explicit-any
zadd(key: string, scoreOrArr: any, memberOrOpts: any, opts?: any) {
const args: (string | number)[] = [key];
let _opts = opts;
Expand Down
2 changes: 1 addition & 1 deletion tests/general_test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { Redis } from "../redis.ts";

const { test, client: redis, opts } = await makeTest("general");
test("conccurent", async function testConcurrent() {
let promises: Promise<any>[] = [];
let promises: Promise<string | undefined>[] = [];
for (const key of ["a", "b", "c"]) {
promises.push(redis.set(key, key));
}
Expand Down

0 comments on commit dd1d035

Please sign in to comment.