function DecoratorPlugin
Since 0.1.0
DecoratorPlugin(options?: DecoratorPluginOptions): IPlugin

Creates the DecoratorPlugin.

The plugin registers the shared metadataStore under CAPABILITIES.METADATA_STORE (so ctx.metadata resolves to it), then registers routes and services from the explicit lists and/or auto-discovered classes, and replays custom decorators against any registered DecoratorHandlers.

Examples

Example 1

import { DecoratorPlugin } from '@setu-ts/decorator-plugin';

app.register(DecoratorPlugin({
  controllers: [UserController, OrderController],
}));

Parameters

optional
options: DecoratorPluginOptions

Plugin configuration

Return Type

IPlugin

The plugin instance

Usage

import { DecoratorPlugin } from "decorator-plugin/src/index.ts";