message: Allow users to configure game, canvas, and socket to be typed more leniently
diff: declare global {
  + /**
  + * Some global variables (such as {@link game}) are only initialized after certain events have happened during the
  + * initialization of Foundry VTT. For that reason, the correct types for these variables include the types for the
  + * uninitialized state.
  + *
  + * While this is correct from a type checking perspective, it can be inconvenient to have to type guard these global
  + * variables everywhere. Some users might prefer the convenience over the 100% correctness in type checking.
  + *
  + * For this reason, this interface provides a way for users to configure certain global variables to be typed more
  + * leniently, i.e., as the types of their initialized state. This is done via declaration merging. To configure a
  + * specific global variable to be typed leniently, the user simply needs to merge a property with the name of the
  + * variable into this interface (the type doesn't matter).
  + *
  + * The currently supported variables are:
  + * - {@link game}
  + * - {@link socket}
  + * - {@link canvas}
  + *
  + * @example
  + * ```typescript
  + * declare global {
  + * interface LenientGlobalVariableTypes {
  + * game: never; // the type doesn't matter
  + * }
  + * }
  + *
  + * const referenceToGame: Game = game; // ok! :)
  + * ```
  + */
  + // eslint-disable-next-line @typescript-eslint/no-empty-interface
  + interface LenientGlobalVariableTypes {}
  +
  let vtt: 'Foundry VTT';
  /**
  @@ -6,14 +38,14 @@ declare global {
  * @remarks
  * Initialized between the `'DOMContentLoaded'` event and the `'init'` hook event.
  */
  - let game: Game | {};
  + let game: 'game' extends keyof LenientGlobalVariableTypes ? Game : Game | {};
  /**
  * @defaultValue `null`
  * @remarks
  * Initialized between the `'DOMContentLoaded'` event and the `'init'` hook event.
  */
  - let socket: io.Socket | null;
  + let socket: 'socket' extends keyof LenientGlobalVariableTypes ? io.Socket : io.Socket | null;
  /**
  * A collection of application instances
  @@ -74,7 +106,7 @@ declare global {
  * @defaultValue `undefined`
  * Initialized between the `'DOMContentLoaded'` event and the `'init'` hook event.
  */
  - let canvas: Canvas | undefined;
  + let canvas: 'canvas' extends keyof LenientGlobalVariableTypes ? Canvas : Canvas | undefined;
  /**
  * A "secret" global to help debug attributes of the currently controlled Token.
  