3 ms·
Not really, not for TS at least. If you just want to take a string and call it an email address and have your function only accept email addresses (the simples
by mason55 2y ago
Not really, not for TS at least. If you just want to take a string and call it an email address and have your function only accept email addresses (the simplest use case) then you need to use branding. That's not encapsulation.
- antifa 2y agoOr double your GC burden by using a wrapper class.