Tech article
Stop Creating Useless Instances in TypeScript
Community description: Confess to me: how many times have you seen (or written) code where someone creates a class full of...
Dev.to | Mar 10, 2026 | Ramon Silva
Automated excerpt
If your function doesn't need to hold any internal "state" (meaning it doesn't use data from a specific instance), you don't need the new keyword. Imagine a simple utility class for formatting. The static keyword isn't just for utility functions.
Selected automatically from source text; not independently written or fact-checked. Read the original for full context.