mirror of
https://github.com/pagefaultgames/pokerogue.git
synced 2025-09-24 07:23:24 +02:00
[Docs] Fix/update some comments and spacing
This commit is contained in:
parent
9f851591cb
commit
be61996044
@ -3,37 +3,25 @@ import type { Phase } from "#app/phase";
|
|||||||
import type { PhaseConstructorMap } from "#app/phase-manager";
|
import type { PhaseConstructorMap } from "#app/phase-manager";
|
||||||
import type { ObjectValues } from "#types/type-helpers";
|
import type { ObjectValues } from "#types/type-helpers";
|
||||||
|
|
||||||
// Intentionally export the types of everything in phase-manager, as this file is meant to be
|
// Intentionally [re-]export the types of everything in phase-manager, as this file is meant to be
|
||||||
// the centralized place for type definitions for the phase system.
|
// the centralized place for type definitions for the phase system.
|
||||||
export type * from "#app/phase-manager";
|
export type * from "#app/phase-manager";
|
||||||
|
|
||||||
// This file includes helpful types for the phase system.
|
/** Map of phase names to constructors for said phase */
|
||||||
// It intentionally imports the phase constructor map from the phase manager (and re-exports it)
|
|
||||||
|
|
||||||
/**
|
|
||||||
* Map of phase names to constructors for said phase
|
|
||||||
*/
|
|
||||||
export type PhaseMap = {
|
export type PhaseMap = {
|
||||||
[K in keyof PhaseConstructorMap]: InstanceType<PhaseConstructorMap[K]>;
|
[K in keyof PhaseConstructorMap]: InstanceType<PhaseConstructorMap[K]>;
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/** Union type of all phase constructors. */
|
||||||
* Union type of all phase constructors.
|
|
||||||
*/
|
|
||||||
export type PhaseClass = ObjectValues<PhaseConstructorMap>;
|
export type PhaseClass = ObjectValues<PhaseConstructorMap>;
|
||||||
|
|
||||||
/**
|
/** Union type of all phase names as strings. */
|
||||||
* Union type of all phase names as strings.
|
|
||||||
*/
|
|
||||||
export type PhaseString = keyof PhaseMap;
|
export type PhaseString = keyof PhaseMap;
|
||||||
|
|
||||||
/** Type for predicate functions operating on a specific type of {@linkcode Phase}. */
|
/** Type for predicate functions operating on a specific type of {@linkcode Phase}. */
|
||||||
|
|
||||||
export type PhaseConditionFunc<T extends PhaseString> = (phase: PhaseMap[T]) => boolean;
|
export type PhaseConditionFunc<T extends PhaseString> = (phase: PhaseMap[T]) => boolean;
|
||||||
|
|
||||||
/**
|
/** Interface type representing the assumption that all phases with pokemon associated are dynamic */
|
||||||
* Interface type representing the assumption that all phases with pokemon associated are dynamic
|
|
||||||
*/
|
|
||||||
export interface DynamicPhase extends Phase {
|
export interface DynamicPhase extends Phase {
|
||||||
getPokemon(): Pokemon;
|
getPokemon(): Pokemon;
|
||||||
}
|
}
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
// biome-ignore-start lint/correctness/noUnusedImports: TSDoc imports
|
// biome-ignore-start lint/correctness/noUnusedImports: TSDoc imports
|
||||||
import type { PhaseManager } from "#app/@types/phase-types";
|
import type { PhaseManager } from "#app/@types/phase-types";
|
||||||
import type { DynamicPhaseMarker } from "#phases/dynamic-phase-marker";
|
import type { DynamicPhaseMarker } from "#phases/dynamic-phase-marker";
|
||||||
|
|
||||||
// biome-ignore-end lint/correctness/noUnusedImports: TSDoc imports
|
// biome-ignore-end lint/correctness/noUnusedImports: TSDoc imports
|
||||||
|
|
||||||
import type { PhaseMap, PhaseString } from "#app/@types/phase-types";
|
import type { PhaseMap, PhaseString } from "#app/@types/phase-types";
|
||||||
|
Loading…
Reference in New Issue
Block a user