Create a type predicate function that checks if input is an instance of the given constructor.
input
constructor
const isDate = instanceOf(Date);isDate(new Date()); // trueisDate('2024-01-01'); // false Copy
const isDate = instanceOf(Date);isDate(new Date()); // trueisDate('2024-01-01'); // false
Create a type predicate function that checks if
inputis an instance of the givenconstructor.