chore: Simplify the state into one

This commit is contained in:
J H
2024-03-06 09:38:55 -07:00
parent 88028412bd
commit 093a5d4ddf
8 changed files with 174 additions and 153 deletions

View File

@@ -0,0 +1,6 @@
export type TimeUnit = "d" | "h" | "s" | "ms"
export type Duration = `${number}${TimeUnit}`
export function duration(timeValue: number, timeUnit: TimeUnit = "s") {
return `${timeValue}${timeUnit}` as Duration
}