dynamically import client api

This commit is contained in:
tresabhi committed 2026-08-02 20:28:57 -05:00
1 parent 8a3e57637d
commit b060e65af5
5 files changed
+82 -111

No files matched your search

@@ -1,22 +0,0 @@
import { fetchTankDefinitions } from '../blitzkit';
import type { BlitzStats } from './compositeStats/constants';
export async function getTierWeights(
stats: Record<number, BlitzStats>,
order: number[] = Object.keys(stats).map(parseInt),
) {
const tankDefinitions = await fetchTankDefinitions();
const tierWeights: TierWeightsRecord = {};
order.forEach((id) => {
const entry = tankDefinitions.tanks[id];
if (!entry) return;
if (!tierWeights[entry.tier]) tierWeights[entry.tier] = 0;
tierWeights[entry.tier]! += stats[id].battles;
});
return tierWeights;
}
export type TierWeightsRecord = Partial<Record<number, number>>;
+8 -9
View File
@@ -1,9 +1,8 @@
export * from './calculateWN8';
export * from './compositeStats';
export * from './deltaBkrlBlitzStats';
export * from './deltaTankStats';
export * from './getBkniPercentile';
export * from './getTierWeights';
export * from './getWN8Percentile';
export * from './percentiles';
export * from './sumAllStats';
export * from "./calculateWN8";
export * from "./compositeStats";
export * from "./deltaBkrlBlitzStats";
export * from "./deltaTankStats";
export * from "./getBkniPercentile";
export * from "./getWN8Percentile";
export * from "./percentiles";
export * from "./sumAllStats";