mirror of
https://github.com/ManInDark/HabitTrove.git
synced 2026-01-20 22:24:28 +01:00
support interval habit frequency (#104)
This commit is contained in:
10
lib/types.ts
10
lib/types.ts
@@ -1,4 +1,6 @@
|
||||
import { RRule } from "rrule"
|
||||
import { uuid } from "./utils"
|
||||
import { DateTime } from "luxon"
|
||||
|
||||
export type UserId = string
|
||||
|
||||
@@ -187,4 +189,12 @@ export interface JotaiHydrateInitialValues {
|
||||
|
||||
export interface ServerSettings {
|
||||
isDemo: boolean
|
||||
}
|
||||
|
||||
export type ParsedResultType = DateTime<true> | RRule | string | null // null if invalid
|
||||
|
||||
// return rrule / datetime (machine-readable frequency), string (human-readable frequency), or null (invalid)
|
||||
export interface ParsedFrequencyResult {
|
||||
message: string | null
|
||||
result: ParsedResultType
|
||||
}
|
||||
Reference in New Issue
Block a user