Closed mattfbacon closed 3 years ago
This applies to Creational/factoryMethod.ts
The user is not static but the user creator is.
If you want to have the creators depend on instance fields, then add instance fields to demonstrate this.
just realized I can't do abstract static so sadly no static
A function to create an instance doesn't really make sense as an instance method, unless that method makes a clone of the existing instance. Same is true if you are just going to take an instance of something else.
General rule: if you don't need access to instance-specific data, don't make it an instance method.
to
and
to