UNPKG

@hestjs/core

Version:

HestJS Core Framework - A TypeScript framework built on Hono with dependency injection and decorators

50 lines 1.85 kB
import 'reflect-metadata'; declare global { namespace Reflect { function getMetadata(key: any, target: any, propertyKey?: string | symbol): any; function defineMetadata(key: any, value: any, target: any, propertyKey?: string | symbol): void; function hasMetadata(key: any, target: any, propertyKey?: string | symbol): boolean; function deleteMetadata(key: any, target: any, propertyKey?: string | symbol): boolean; function getOwnMetadata(key: any, target: any, propertyKey?: string | symbol): any; function getMetadataKeys(target: any, propertyKey?: string | symbol): any[]; function getOwnMetadataKeys(target: any, propertyKey?: string | symbol): any[]; } } /** * 反射工具类 */ export declare class Reflector { /** * 获取元数据 */ static get<T = any>(key: any, target: any, propertyKey?: string | symbol): T | undefined; /** * 设置元数据 */ static set(key: any, value: any, target: any, propertyKey?: string | symbol): void; /** * 检查是否存在元数据 */ static has(key: any, target: any, propertyKey?: string | symbol): boolean; /** * 删除元数据 */ static delete(key: any, target: any, propertyKey?: string | symbol): boolean; /** * 获取自身元数据 */ static getOwn<T = any>(key: any, target: any, propertyKey?: string | symbol): T | undefined; /** * 获取所有元数据键 */ static getKeys(target: any, propertyKey?: string | symbol): any[]; /** * 获取自身所有元数据键 */ static getOwnKeys(target: any, propertyKey?: string | symbol): any[]; /** * 合并多个目标的元数据 */ static getAllMetadata<T = any>(key: any, targets: any[]): T[]; } //# sourceMappingURL=reflector.d.ts.map