UNPKG

@halospv3/hce.shared-config

Version:

Automate commit message quality, changelogs, and CI/CD releases. Its `main` entry point is a Semantic Release config. Functions and classes are exposed for customization. An ESLint config, a Commitlint config, and addl. resources for .NET projects are als

25 lines 1.9 kB
import { InstanceOrStatic } from "../miscTypes.mjs"; import { BaseClassProto, ClassLike, ConstructorConstraint, SuperClassLike, WithProto } from "./inheritance.mjs"; import { InstancePropertyDescriptorMap } from "./InstancePropertyDescriptorMap.mjs"; import { OwnPropertyDescriptorMap } from "./OwnPropertyDescriptorMap.mjs"; //#region src/utils/reflection/getOwnPropertyDescriptors.d.ts /** * Get the property descriptors of the class or constructor similar to {@link Object.getOwnPropertyDescriptors}, but with more options--including recursion. * @template {InstanceOrStatic} _InstanceOrStatic 'Instance' or 'Static'. Determines the return type. * @param classDefinition A class or constructor, cast to {@link ClassLike}. * @param instanceOrStatic 'Instance' or 'Static'. Determines the return type. * @template {ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>} Class * The typeof {@link classDefinition}. * {@link WithProto}<{@link SuperClassLike}> is necessary for walking the * prototype chain for both Instance and Static properties. * If unspecified, the return type may be incorrect. * @returns ({@link instanceOrStatic} === 'Instance') ? {@link InstancePropertyDescriptorMap<Class>}\ * : ({@link instanceOrStatic} === 'Static') ? {@link OwnPropertyDescriptorMap<Class>}\ * : never * @throws {TypeError} * @since 3.0.0 */ declare function getOwnPropertyDescriptors<Class extends ClassLike<ConstructorConstraint<Class> & WithProto<SuperClassLike | BaseClassProto>>, _InstanceOrStatic extends InstanceOrStatic>(classDefinition: Class, instanceOrStatic: _InstanceOrStatic): [_InstanceOrStatic] extends ["Instance"] ? InstancePropertyDescriptorMap<Class> : [_InstanceOrStatic] extends ["Static"] ? OwnPropertyDescriptorMap<Class> : never; //#endregion export { getOwnPropertyDescriptors }; //# sourceMappingURL=getOwnPropertyDescriptors.d.mts.map