fix date type for ISODate

This commit is contained in:
Julien Calixte
2023-04-10 16:15:57 +02:00
parent f8a7231cd0
commit 531a05be26
2 changed files with 6 additions and 3 deletions

View File

@@ -1,3 +1,5 @@
export type ISODate = string
type Brand<K, T> = K & { __brand: T }
export const toISODate = (date: Date): ISODate => date.toISOString()
export type ISODate = Brand<string, 'ISODate'>
export const toISODate = (date: Date): ISODate => date.toISOString() as ISODate