Fix TypeScript typing error

error TS2008: Value of type '{}' is not indexable by type 'Date'.