Skip to content
generated from stagas/ts

decorator that attaches setters to class properties

Notifications You must be signed in to change notification settings

stagas/setter-decorator

Repository files navigation

setter-decorator

decorator that attaches setters to properties

🔧 Install · 🧩 Example · 📜 API docs · 🔥 Releases · 💪🏼 Contribute · 🖐️ Help


Install

$ npm i setter-decorator

API

Table of Contents

settable

src/index.ts:35-82

Decorates a class as @settable. This is required for @setter to work.

Parameters

  • ctor any The class to decorate

Returns any The decorated class

setter

src/index.ts:122-143

Attaches a @setter to a property.

Parameters

  • fn Setter The setter function

Returns PropertyDecorator A property decorator

Contribute

Fork or edit and submit a PR.

All contributions are welcome!

License

MIT © 2021 stagas