fix date type for ISODate
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user