2021-12-27 15:18:35 +05:00
|
|
|
|
export type { RawDate, timeInS } from './datetime'
|
2021-12-27 15:18:20 +05:00
|
|
|
|
export { isRawDate, formatDate, defaultFormat, periodToString } from './datetime'
|
2021-11-29 16:49:22 +05:00
|
|
|
|
|
|
|
|
|
export const headerHeight = 64
|
|
|
|
|
|
|
|
|
|
export const mainFrameSize = () => ({
|
|
|
|
|
width: window.innerWidth,
|
|
|
|
|
height: window.innerHeight - headerHeight
|
|
|
|
|
})
|
2021-12-22 12:45:30 +05:00
|
|
|
|
|
|
|
|
|
export const arrayOrDefault = <T extends unknown>(arr?: unknown, def: T[] = []): T[] => Array.isArray(arr) ? arr : def
|
2022-03-02 21:17:27 +05:00
|
|
|
|
|
|
|
|
|
/**
|
|
|
|
|
* Объединить типы, исключив совпадающие поля справа
|
|
|
|
|
* @param T Тип, передаваемый полностью
|
|
|
|
|
* @param R Аддитивный тип
|
|
|
|
|
*/
|
|
|
|
|
export type OmitExtends<T, R> = T & Omit<R, keyof T>
|