Static Factory Methods | Object-Oriented Programming w/ TypeScript
Last updated Nov 21st, 2019
In this blog post, I explain how we can use the static factory method to enforce rules against how an object is created.
Go read "When to Use a Private Constructor | Object-Oriented Programming w/ TypeScript".
You'll use static factory methods for the same reason you'll want to use a private
constructor.
Stay in touch!
Join 20000+ value-creating Software Essentialists getting actionable advice on how to master what matters each week. 🖖
View more in TypeScript