builder-pattern
builder-pattern copied to clipboard
Does this library support class method?
trafficstars
Hi. Thanks for this great library.
I've been using it for my side project, and encountered a problem.
My class looks like:
export class MyClass {
id:number;
public method(){};
}
I created a class instance by using builder as below:
const myClass: MyClass =
Builder<MyClass>()
.id(1)
.build();
I expected the instance would have the class method but the object does not have any method.
Does build method only support field properties, not the method?
Regards,