mirror of
https://github.com/streetwriters/notesnook.git
synced 2025-12-23 23:19:40 +01:00
common: fix ts errors
This commit is contained in:
committed by
Abdullah Atta
parent
843be2a62c
commit
9ef40c01ce
@@ -64,20 +64,20 @@ export function getTimeFormat(format: TimeFormat) {
|
||||
return format === "12-hour" ? "hh:mm A" : "HH:mm";
|
||||
}
|
||||
|
||||
type TimeOptions = {
|
||||
export type TimeOptions = {
|
||||
type: "time";
|
||||
timeFormat: TimeFormat;
|
||||
};
|
||||
type DateOptions = {
|
||||
export type DateOptions = {
|
||||
type: "date";
|
||||
dateFormat: string;
|
||||
};
|
||||
type DateTimeOptions = {
|
||||
export type DateTimeOptions = {
|
||||
type: "date-time";
|
||||
dateFormat: string;
|
||||
timeFormat: TimeFormat;
|
||||
};
|
||||
type FormatDateOptions = TimeOptions | DateOptions | DateTimeOptions;
|
||||
export type FormatDateOptions = TimeOptions | DateOptions | DateTimeOptions;
|
||||
|
||||
export function formatDate(
|
||||
date: string | number | Date | null | undefined,
|
||||
|
||||
Reference in New Issue
Block a user