get-target
TypeScript icon, indicating that this package has built-in type declarations

1.0.0 • Public • Published

Get Target

builder's extractor of a class, for handling of decorators

NPM Version Package License NPM Downloads Coverage

🏆 Installation

# Using npm 
npm install --save get-target
 
# Using yarn 
yarn add --save get-target

🏳‍🌈 Usage

import getTarget from 'get-target';
 
// For class decorator
function Module(options) {
   return target => {
      target = getTarget(target);
      // Here you can use your builder to store in ReflecMetadata !
   };
}
 
// For param decorator
function Param(options) {
   return (target, property, index) => {
      target = getTarget(target);
      // Here you can use your builder to store in ReflecMetadata !
   };
}

⭐ Support for

get-target is an open source project licensed by MIT. You can grow thanks to the sponsors and the support of the amazing sponsors. If you want to join them, contact me here.

🎩 Stay in touch

Contributors

Thanks to the wonderful people who collaborate with me !

📜 License

get-target under License MIT.

Package Sidebar

Install

npm i get-target

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

4.23 kB

Total Files

4

Last publish

Collaborators

  • yonicb