/** * Returns an array of the names of constructors in the prototype chain of the given constructor. * * **Note**: the `getProtoChain.maxDepth` for `mixinCtors` is 10, You can change it. * * @param {function} ctor - The constructor to get the prototype chain of. * @throws {Error} If the maximum depth of nesting is reached. * @returns {string[]} An array of the names of constructors in the prototype chain of the given constructor. * * @example * * // Define a class hierarchy * class Animal {} * class Mammal extends Animal {} * class Cat extends Mammal {} * * // Get the prototype chain of the Cat class * const protoChain = getProtoChain(Cat); * console.log(protoChain); // Output: ["Animal", "Mammal","Cat"] */ export function getProtoChain(ctor: Function, depth: any): string[]; export namespace getProtoChain { const maxDepth: number; } export default getProtoChain;