-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Description
For example,
// eslint-disable-next-line @typescript-eslint/consistent-type-assertions
const d = new Date(value as number | string | Date);
can probably become:
const d = new Date(typeof value === "string" ? value : +value);
(courtesy of:)
/**
* Converts a Date object to a number.
*/
[Symbol.toPrimitive](hint: "number"): number;
Metadata
Metadata
Assignees
Labels
No labels