From f3ab4a696659bcd3db196ea89a43eaeab3fdca81 Mon Sep 17 00:00:00 2001 From: Sophie L Date: Wed, 9 Nov 2022 22:04:56 +0000 Subject: [PATCH] fix: move the Session type to Client.ts (#60) --- src/Client.ts | 2 ++ src/globals.d.ts | 1 - src/websocket/notifications.ts | 1 + 3 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/Client.ts b/src/Client.ts index 2154f2f8..09c557e0 100644 --- a/src/Client.ts +++ b/src/Client.ts @@ -135,6 +135,8 @@ export type FileArgs = [ fallback?: string, ]; +export type Session = { token: string }; + export class Client extends EventEmitter { heartbeat: number; diff --git a/src/globals.d.ts b/src/globals.d.ts index a115cb52..5ee555c4 100644 --- a/src/globals.d.ts +++ b/src/globals.d.ts @@ -1,2 +1 @@ type Tail = T extends [infer _A, ...infer R] ? R : never; -type Session = { token: string }; diff --git a/src/websocket/notifications.ts b/src/websocket/notifications.ts index 0567d6c7..21429095 100644 --- a/src/websocket/notifications.ts +++ b/src/websocket/notifications.ts @@ -8,6 +8,7 @@ import type { import type { Channel, Message } from "revolt-api"; import type { Member, MemberCompositeKey, Role, Server } from "revolt-api"; import type { RelationshipStatus, User } from "revolt-api"; +import type { Session } from "../Client"; type WebSocketError = { error: