From c55c741c81c5ea849d221e060844290ceb291f9e Mon Sep 17 00:00:00 2001 From: Annika <56906084+AnnikaCodes@users.noreply.github.com> Date: Mon, 26 Oct 2020 13:55:51 -0700 Subject: [PATCH] Move server/'s global variables out of index.ts (#7585) --- server/global-variables.d.ts | 17 ++++++++++++----- server/index.ts | 3 --- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/server/global-variables.d.ts b/server/global-variables.d.ts index e06e7810e782..4824734d80fc 100644 --- a/server/global-variables.d.ts +++ b/server/global-variables.d.ts @@ -19,16 +19,23 @@ import {Tournaments as TournamentsType} from './tournaments'; declare global { namespace NodeJS { interface Global { - Dex: any; - toID: (item: any) => ID; - IPTools: any; Config: any; Chat: any; - Tournaments: any; + Dex: any; + IPTools: any; + Ladders: any; LoginServer: any; + Monitor: any; + nodeOomHeapdump: any; Punishments: any; + Rooms: any; + Sockets: any TeamValidator: any; - Monitor: any; + TeamValidatorAsync: any; + Tournaments: any; + Users: any; + Verifier: any; + toID: (item: any) => ID; __version: {head: string, origin?: string, tree?: string}; } } diff --git a/server/index.ts b/server/index.ts index e60acb9cee8f..b05f8dbfd100 100644 --- a/server/index.ts +++ b/server/index.ts @@ -77,9 +77,6 @@ import {FS} from '../lib/fs'; * Load configuration *********************************************************/ -// global becomes much easier to use if declared as an object -declare const global: any; - import * as ConfigLoader from './config-loader'; global.Config = ConfigLoader.Config;