2.1.0 • Published 4 years ago
@decorize/core v2.1.0
The library contains utilities for creating decorators and registering them during their usage.
Install
npm install @decorize/core --save
Usage
Create class
decorator:
import { classLegacyDecorator } from '@decorize/core';
classLegacyDecorator('<decoratorID>', (target: object) => '<logic here>');
Create accessor
decorator:
import { accessorLegacyDecorator } from '@decorize/core';
accessorLegacyDecorator('<decoratorID>', (target: object, property: PropertyKey, description: PropertyDescriptor) => {
'<logic here>';
});
Create method
decorator:
import { methodLegacyDecorator } from '@decorize/core';
methodLegacyDecorator('<decoratorID>', (target: object, property: PropertyKey, description: PropertyDescriptor) => {
'<logic here>';
});
Create parameter
decorator:
import { parameterLegacyDecorator } from '@decorize/core';
parameterLegacyDecorator('<decoratorID>', (target: object, method: PropertyKey, paramIdx: number) => {
'<logic here>';
});
Create property
decorator:
import { propertyLegacyDecorator } from '@decorize/core';
propertyLegacyDecorator('<decoratorID>', (target: object, property: PropertyKey) => {
'<logic here>';
});
Metadata
The library provides a wrapper around reflect-metadata
with backup implementation for the assignment of the decorator's metadata to the class.
Future
We are actively supporting the package, so please contact us at GitHub or Gitter if you have any suggestions or questions.
2.1.0
4 years ago
2.0.0
4 years ago
1.0.1
4 years ago
1.0.0
4 years ago
0.0.1-rc.2
4 years ago
0.0.1-rc.1
4 years ago