UNPKG

@hestjs/core

Version:

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

59 lines 1.81 kB
import 'reflect-metadata'; import type { ControllerMetadata, RouteMetadata, ModuleMetadata, ParameterMetadata, InjectableMetadata } from '../interfaces/metadata'; declare global { namespace Reflect { function getMetadata(key: any, target: any, propertyKey?: string | symbol): any; function hasMetadata(key: any, target: any, propertyKey?: string | symbol): boolean; function getMetadataKeys(target: any, propertyKey?: string | symbol): any[]; } } /** * 元数据扫描器 */ export declare class MetadataScanner { /** * 扫描控制器元数据 */ static scanController(target: any): ControllerMetadata | undefined; /** * 扫描路由元数据 */ static scanRoutes(target: any): RouteMetadata[]; /** * 扫描模块元数据 */ static scanModule(target: any): ModuleMetadata | undefined; /** * 扫描可注入元数据 */ static scanInjectable(target: any): InjectableMetadata | undefined; /** * 扫描方法参数元数据 */ static scanParameters(target: any, methodName: string): ParameterMetadata[]; /** * 获取构造函数参数类型 */ static getConstructorParameters(target: any): any[]; /** * 获取方法参数类型 */ static getMethodParameters(target: any, methodName: string): any[]; /** * 检查是否为控制器 */ static isController(target: any): boolean; /** * 检查是否为模块 */ static isModule(target: any): boolean; /** * 检查是否可注入 */ static isInjectable(target: any): boolean; /** * 获取所有元数据键 */ static getAllMetadataKeys(target: any, propertyKey?: string | symbol): any[]; } //# sourceMappingURL=metadata-scanner.d.ts.map