Exploring TypeScript to enhance the data solidity of my app. Isn't that its primary purpose?
I'm curious if it's doable to define a type with very precise properties:
- should be an object
- must contain zero or one properties
- each key should be a URI
- each value should be a URI
Can TypeScript accomplish this, and if so, how? If not, what alternative would you recommend for implementing such logic?
Appreciate your insights!