TypeScript Fundamentals × Satisfies and as const

Jan. 9, 2023, 8:16 p.m. (1 year, 10 months ago)
0 Comments

In this Hasty Treat, Scott and Wes talk about Satisfies and as const.

Show Notes

 export const currencies = { USD: 'US Dollars', CAD: 'Canadian Dollar', EUR: 'Euro', } as const;  export type Currency = typeof currencies; export type CurrencyCode = keyof Currency;  

Tweet us your tasty treats

Login to Add New Comment
No comments have been posted yet, be the first one to comment.