Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/deno_nest/src/factorys/mod.ts>ClassFactory

Refer to nestjs to realize some common functions for Deno, support hono and oak
Go to Latest
class ClassFactory
import { ClassFactory } from "https://deno.land/x/deno_nest@v3.5.2/src/factorys/mod.ts";

Properties

globalCaches: FactoryCaches
instanceCaches: Map<Instance, FactoryCaches>

Methods

copyProviderCache(
item: Provider | symbol,
oldCache: FactoryCaches,
newCache: FactoryCaches,
)
create<T>(target: Constructor<T>, options?: { scope?: Scope; caches?: FactoryCaches; parentClass?: Constructor; }): Promise<T>
getInstance<T>(target: Constructor<T>, options?: { scope?: Scope; caches?: FactoryCaches; parentClass?: Constructor; }): Promise<T>
getInstanceFromCaches<T>(target: any, cache?: FactoryCaches): T | undefined
getMergedMetas<T>(
target: InstanceType<Constructor> | null,
fn: ControllerMethod | null,
globalMetas: ExceptionFilters | NestGuards | NestUseInterceptors,
metaKey: string | symbol,
): Promise<T[]>
getRouterArr(controllers: Constructor[])
initProvider(provider: Provider, options?: { scope?: Scope; caches?: FactoryCaches; })
mapRoute(Cls: Constructor): Promise<RouteMap[]>