@geneiryodan_/wz-tracker-types
v0.1.4
Published
Shared TypeScript types and rank ladder for the Warzone Tracker app.
Readme
@geneiryodan_/wz-tracker-types
Shared TypeScript types and the Warzone rank ladder for the Warzone Tracker app.
This package is consumed by the project's apps/web (Vue 3) and apps/api (ElysiaJS) workspaces, but it has no runtime dependencies and is safe to use standalone.
Install
npm install @geneiryodan_/wz-tracker-typesUsage
import {
GAME_MODES,
SQUAD_SIZES,
RANK_BRACKETS,
TIER_COLOR,
rankFromSr,
type GameMode,
type SquadSize,
type MatchPayload,
type SummaryStats,
} from '@geneiryodan_/wz-tracker-types';
const rank = rankFromSr(4250);
console.log(rank.label); // "Platinum II"
console.log(TIER_COLOR[rank.tier]); // "#67e8f9"What's in the box
GAME_MODES,SQUAD_SIZES, mode/squad labels, ranked-mode helpers.RANK_BRACKETS— full Warzone Ranked Resurgence ladder (Bronze I → Iridescent) with SR thresholds.TIER_COLOR/TIER_GRADIENT— colors and gradient strings for each rank tier.rankFromSr(sr)— resolves an SR value to its bracket.- Types:
MatchPayload,MatchRecord,SummaryStats,TimeseriesPoint,DayOfWeekStat,RangeOption,ModeFilter.
License
MIT
