UNPKG

@ccms/container

Version:

MiaoScript container package

47 lines 1.97 kB
import "reflect-metadata"; import { interfaces, Container } from 'inversify'; /** * 注册一个命名对象 * @param identifier 标识符 * @param name 名称 */ export declare const provideNamed: (identifier: interfaces.ServiceIdentifier<any>, name: string) => (target: any) => any; /** * 注册一个单例对象 * @param identifier 标识符 */ export declare const provideSingleton: (identifier: interfaces.ServiceIdentifier<any>) => (target: any) => any; /** * 注册一个单例对象 * @param identifier 标识符 */ export declare const provideSingletonNamed: (identifier: interfaces.ServiceIdentifier<any>, name: string) => (target: any) => any; /** * 获得一个 java.lang.Class * @param className Java全类名 */ export declare const JavaClass: (className: string) => (target: object, propertyKey: string, index?: number) => void; /** * 获得一个JS的Java类 * @param className Java 全类名 */ export declare const JSClass: (className: string) => (target: object, propertyKey: string, index?: number) => void; /** * 自动注入实例由平台实现 * @param className 类名 */ export declare const Autowired: (className?: any) => (target: any, propertyKey: string, index?: number) => void; /** * 自动注入资源由平台实现 * @param className 类名 */ export declare const Resource: (resourceName?: string | any) => (target: any, propertyKey: string, index?: number) => void; export declare const MavenDepend: (groupId: string, artifactId: string, version: string, recursion?: boolean) => (target: any) => void; export declare function loadMavenDepend(groupId: string, artifactId: string, version: string, recursion?: boolean): void; export declare const reduceMetadata: (ctx: interfaces.Context) => any; export declare const DefaultContainer: Container; export * from 'inversify'; export * from './constants'; export * from './decorators'; export * from 'inversify-binding-decorators'; //# sourceMappingURL=index.d.ts.map