Assert that a type is a Date.
Date
Type that must be a Date
Ensures the type extends the built-in Date object. Useful for APIs that rely on actual Date instances.
type A = AssertDate< Date >; // ✓type B = AssertDate< string >; // ✗ TS error Copy
type A = AssertDate< Date >; // ✓type B = AssertDate< string >; // ✗ TS error
Assert that a type is a
Date.