From b4d345fe536d2105232f6cf25c6a42bd1b14dd55 Mon Sep 17 00:00:00 2001 From: ogzhanolguncu Date: Thu, 11 Jan 2024 14:22:00 +0300 Subject: [PATCH] Format files --- src/commands/command.ts | 14 ++------------ src/vector.ts | 15 +++++---------- 2 files changed, 7 insertions(+), 22 deletions(-) diff --git a/src/commands/command.ts b/src/commands/command.ts index 02ed317..4b5e355 100644 --- a/src/commands/command.ts +++ b/src/commands/command.ts @@ -1,14 +1,7 @@ import { UpstashError } from "@error/index"; import { Requester } from "@http"; -const ENDPOINTS = [ - "upsert", - "query", - "delete", - "fetch", - "reset", - "range", -] as const; +const ENDPOINTS = ["upsert", "query", "delete", "fetch", "reset", "range"] as const; export type EndpointVariants = (typeof ENDPOINTS)[number]; /** @@ -18,10 +11,7 @@ export class Command { public readonly payload: Record | unknown[]; public readonly endpoint: EndpointVariants; - constructor( - command: Record | unknown[], - endpoint: EndpointVariants - ) { + constructor(command: Record | unknown[], endpoint: EndpointVariants) { this.payload = command; this.endpoint = endpoint; } diff --git a/src/vector.ts b/src/vector.ts index eaaa261..e66b9f8 100644 --- a/src/vector.ts +++ b/src/vector.ts @@ -32,15 +32,10 @@ export class Index { this.client = client; } - delete = (args: CommandArgs) => - new DeleteCommand(args).exec(this.client); - query = (args: CommandArgs) => - new QueryCommand(args).exec(this.client); - upsert = (args: CommandArgs) => - new UpsertCommand(args).exec(this.client); - fetch = (args: CommandArgs) => - new FetchCommand(args).exec(this.client); + delete = (args: CommandArgs) => new DeleteCommand(args).exec(this.client); + query = (args: CommandArgs) => new QueryCommand(args).exec(this.client); + upsert = (args: CommandArgs) => new UpsertCommand(args).exec(this.client); + fetch = (args: CommandArgs) => new FetchCommand(args).exec(this.client); reset = () => new ResetCommand().exec(this.client); - range = (args: CommandArgs) => - new RangeCommand(args).exec(this.client); + range = (args: CommandArgs) => new RangeCommand(args).exec(this.client); }