UNPKG

@polkadot/util

Version:
18 lines (17 loc) 537 B
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 '@polkadot/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;