4 lines
109 B
TypeScript
4 lines
109 B
TypeScript
|
export function asDate(d: string|Date): Date {
|
||
|
if (typeof d === 'string') return new Date(d);
|
||
|
return d;
|
||
|
}
|