Skip to content

A TypeScript module for creational design patterns (Builder Method, With, Auto Setters and Getters)

License

Notifications You must be signed in to change notification settings

ZZiane/creational-methods

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Creational Methods: TypeScript Decorators Module

This module provides a set of TypeScript decorators designed to streamline the creation of classes by automatically adding builder, getter, setter, and method-chaining functionalities. The decorators simplify class management, making code more readable and maintainable.

Features

  • Builder Decorator (Builder): Enables the creation of a builder method that collects properties and builds an instance with consistent public field mappings.
  • Getter Decorator (Getter): Automatically adds getter methods for class properties, simplifying property access.
  • Setter Decorator (Setter): Adds setter methods to enable property mutation in a consistent manner.
  • With Decorator (With): Facilitates method chaining by adding methods prefixed with with for easy property assignment.

Installation

Ensure that Node.js is installed, then integrate this module into your TypeScript project.

npm i creational-methods

Contributing

  1. Fork the repository.
  2. Create a new branch for your feature.
  3. Commit your changes and open a pull request.

About

A TypeScript module for creational design patterns (Builder Method, With, Auto Setters and Getters)

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published