UNPKG

power-di

Version:

A lightweight Dependency Injection library. Using es6 and other features, remove unnecessary concepts, easy and convenient to use.

22 lines 769 B
"use strict"; Object.defineProperty(exports, "__esModule", { value: true }); exports.getSuperClassInfo = void 0; var getGlobalType_1 = require("./getGlobalType"); function getSuperClassInfo(classType) { if (!(0, getGlobalType_1.isClass)(classType)) { throw new Error('need a classType.'); } var superClasses = []; var tmpType = Object.getPrototypeOf(classType); while ((0, getGlobalType_1.isClass)(tmpType)) { var type = (0, getGlobalType_1.getGlobalType)(tmpType); superClasses.push({ type: type, class: tmpType, }); tmpType = Object.getPrototypeOf(tmpType); } return superClasses; } exports.getSuperClassInfo = getSuperClassInfo; //# sourceMappingURL=getSuperClassInfo.js.map