ligun and sogup

This commit is contained in:
john 2025-05-06 16:31:55 +02:00
parent b6633d6f25
commit 4573048a47
24 changed files with 482 additions and 226 deletions

19
src/utils/validation.ts Normal file
View file

@ -0,0 +1,19 @@
export type Validation = Valid | Invalid
interface Valid {
isValid: true
error: null
}
interface Invalid {
isValid: false
error: string
}
export function valid(): Validation {
return { isValid: true, error: null }
}
export function invalid(error: string): Validation {
return { isValid: false, error }
}