Choose the most useful place to add a TypeScript type boundary in a small feature.
A discount widget is about to be reused. The internals are small, but the caller contract is vague: amount, currency, and expiry are all accepted as loose values.
Sign up free — one personalized lesson every day, matched to your role and goals.
Already have an account? Sign in