|
1 | | -import { type ComputedRef, type Ref, computed } from "@vue/reactivity"; |
2 | | -import { type SumStatsArgument, calcBaseStats, calcRankUps, isGlitched, sumStats } from "./functions"; |
| 1 | +import { type ComputedRef, computed, type Ref } from "@vue/reactivity"; |
| 2 | +import { |
| 3 | + calcBaseStats, |
| 4 | + calcRankUps, |
| 5 | + isGlitched, |
| 6 | + type SumStatsArgument, |
| 7 | + sumStats, |
| 8 | +} from "./functions"; |
3 | 9 |
|
4 | | -export function useCalcBaseStats(mainStats: Ref<number>, bonusStats: Ref<number>, rankUps: Ref<number>): ComputedRef<number> { |
5 | | - return computed(() => calcBaseStats(mainStats.value, bonusStats.value, rankUps.value)); |
| 10 | +export function useCalcBaseStats( |
| 11 | + mainStats: Ref<number>, |
| 12 | + bonusStats: Ref<number>, |
| 13 | + rankUps: Ref<number>, |
| 14 | +): ComputedRef<number> { |
| 15 | + return computed(() => |
| 16 | + calcBaseStats(mainStats.value, bonusStats.value, rankUps.value), |
| 17 | + ); |
6 | 18 | } |
7 | 19 |
|
8 | 20 | export function useCalcRankUps(expeditions: Ref<number>): ComputedRef<number> { |
9 | 21 | return computed(() => calcRankUps(expeditions.value)); |
10 | 22 | } |
11 | 23 |
|
12 | | -export function useIsGlitched(baseStats: Ref<number>, expeditions: Ref<number>): ComputedRef<boolean> { |
| 24 | +export function useIsGlitched( |
| 25 | + baseStats: Ref<number>, |
| 26 | + expeditions: Ref<number>, |
| 27 | +): ComputedRef<boolean> { |
13 | 28 | return computed(() => isGlitched(baseStats.value, expeditions.value)); |
14 | 29 | } |
15 | 30 |
|
16 | | -export function useSumStats(stats: Ref<SumStatsArgument[]>): ComputedRef<number> { |
| 31 | +export function useSumStats( |
| 32 | + stats: Ref<SumStatsArgument[]>, |
| 33 | +): ComputedRef<number> { |
17 | 34 | return computed(() => sumStats(stats.value)); |
18 | 35 | } |
0 commit comments