fix: tsconfig, types
This commit is contained in:
@@ -1,7 +1,7 @@
|
||||
import type { PrimitiveFieldType } from "../../types/primitive-field-type.type"
|
||||
import { toDate } from "./converters.util";
|
||||
|
||||
export const viewDate = (data: unknown, type: PrimitiveFieldType) => {
|
||||
export const viewDate = (data: unknown, type?: PrimitiveFieldType) => {
|
||||
if (type !== 'date') return data;
|
||||
return toDate(data as number | Date).toLocaleDateString('ru-RU', {
|
||||
year: 'numeric',
|
||||
|
||||
Reference in New Issue
Block a user