/** * A stricter type guard. * @see https://tsplay.dev/WK8zGw */ export const hasOwnProperty = ( object: X, property: Y, ): object is Record & X => { return Object.prototype.hasOwnProperty.call(object, property); };