Files

18 lines
536 B
TypeScript

import type { Class } from '../types.js';
/**
* @name isChildClass
* @summary Tests if the child extends the parent Class
* @description
* Checks to see if the child Class extends the parent Class
* @example
* <BR>
*
* ```javascript
* import { isChildClass } from '@pezkuwi/util';
*
* console.log('isChildClass', isChildClass(BN, BN); // => true
* console.log('isChildClass', isChildClass(BN, Uint8Array); // => false
* ```
*/
export declare function isChildClass<P extends Class>(Parent: P, Child?: unknown): Child is P;