Manipulating dates in Typescript
The correct way to subtract or add dates when using Typescript const diff = new Date().valueOf() - date.valueOf(); Enter fullscreen mode Exit fullscreen mode valueOf gives you the date as number which satisfies Typescript. Doing the following produces a warning...