Skip to content

A ClassBuilder or a buildClass() #4

Description

@HugoMendes98

It can be useful if we want to extend a class with it.

const BuildedClass = ObjectBuilder
  .create()
  /* .with() */
  .buildClass();

const myInstance = new BuildedClass();
class MyClass extends BuildedClass {}

It should also give a way to set the decorators.

ObjectBuilder
  .create()
  /* .with() */
  .buildClass({decorators: {["key"]: [/*decorators*/]});

or

ClassBuilder
  .create()
  .with("key", () => 0, {decorators: [/*decorators*/]});

Note: it is kinda already possible: by overriding the keys and calling the decorators functions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions