Move nil to @types/common

This commit is contained in:
Sirz Benjie 2025-09-22 13:11:58 -05:00
parent ba7be773dc
commit 6896e9abaa
No known key found for this signature in database
GPG Key ID: 4A524B4D196C759E
6 changed files with 7 additions and 7 deletions

View File

@ -2,3 +2,5 @@ export type ConditionFn = (args?: any[]) => boolean;
/** Alias for the constructor of a class */
export type Constructor<T> = new (...args: unknown[]) => T;
export type nil = null | undefined;

View File

@ -7,8 +7,9 @@ import { AnimBlendType, AnimFocus, AnimFrameTarget, ChargeAnim, CommonAnim } fro
import { MoveFlags } from "#enums/move-flags";
import { MoveId } from "#enums/move-id";
import type { Pokemon } from "#field/pokemon";
import type { nil } from "#types/common";
import { coerceArray } from "#utils/array";
import { getFrameMs, type nil } from "#utils/common";
import { getFrameMs } from "#utils/common";
import { getEnumKeys, getEnumValues } from "#utils/enums";
import { toKebabCase } from "#utils/strings";
import Phaser from "phaser";

View File

@ -24,8 +24,7 @@ import { SpeciesFormKey } from "#enums/species-form-key";
import { SpeciesId } from "#enums/species-id";
import { WeatherType } from "#enums/weather-type";
import type { Pokemon } from "#field/pokemon";
import type { Constructor } from "#types/common";
import type { nil } from "#utils/common";
import type { Constructor, nil } from "#types/common";
export type SpeciesFormChangeConditionPredicate = (p: Pokemon) => boolean;
export type SpeciesFormChangeConditionEnforceFunc = (p: Pokemon) => void;

View File

@ -37,9 +37,9 @@ import { getMoveTargets, isFieldTargeted } from "#moves/move-utils";
import { PokemonMove } from "#moves/pokemon-move";
import { PokemonPhase } from "#phases/pokemon-phase";
import { DamageAchv } from "#system/achv";
import type { nil } from "#types/common";
import type { DamageResult } from "#types/damage-result";
import type { TurnMove } from "#types/turn-move";
import type { nil } from "#utils/common";
import { BooleanHolder, NumberHolder } from "#utils/common";
import i18next from "i18next";

View File

@ -7,8 +7,8 @@ import { MysteryEncounterType } from "#enums/mystery-encounter-type";
import { SpeciesId } from "#enums/species-id";
import { TextStyle } from "#enums/text-style";
import { WeatherType } from "#enums/weather-type";
import type { nil } from "#types/common";
import { addTextObject } from "#ui/text";
import type { nil } from "#utils/common";
import i18next from "i18next";
export enum EventType {

View File

@ -3,8 +3,6 @@ import { MoneyFormat } from "#enums/money-format";
import type { Variant } from "#sprites/variant";
import i18next from "i18next";
export type nil = null | undefined;
export const MissingTextureKey = "__MISSING";
// TODO: Draft tests for these utility functions