Skip to content

StoreFn

@tsed/core

Usage

typescript
import { StoreFn } from "@tsed/core";

See /packages/core/src/decorators/storeFn.ts.

Overview

ts
function StoreFn(fn: (store: Store, parameters: DecoratorParameters) => void): Function;

Description

Creates a decorator factory that initializes a Store from decorator parameters and invokes a callback.

The callback receives both the Store instance and the original decorator parameters. If the callback returns a function, that function is invoked with the same decorator parameters.

Released under the MIT License.