Typescript Index Signatures, keyof Assertions & the Record Utility Type
Typescript Index Signatures, keyof Assertions & the Record utility type are all useful when creating object types and accessing their properties dynamically. We look at examples using all 3 in this TS tutorial.
π Become a full-stack web dev with Zero To Mastery Courses:
- The Complete Web Developer:
- Master the Coding Interview:
- Junior to Senior Dev Roadmap:
π© Subscribe β
π¬ Course Updates β
β Questions - Please post them to my Discord β
β Buy Me A Coffee β
π Follow Me On Social Media:
Github:
Twitter:
LinkedIn:
π All Resources for this Typescript Course:
π Playlist for this Typescript Course:
Typescript Index Signatures, keyof Assertions & the Record Utility Type
(00:00) Intro
(00:05) Welcome
(00:30) Starter code and set up
(02:00) What are index signatures?
(02:33) Why you need an index signature
(06:09) Index signature syntax
(08:14) readonly modifier
(08:52) Non-existing properties
(09:52) Required properties combined with an index signature
(11:10) Optional properties
(13:40) keyof Assertions
(16:53) Record utility type vs index signatures
π Suggested Pre-requisites for this Typescript course:
πJavaScript for Beginners full course:
π Tutorial References:
π Typescript Official Website:
π Anders Hejlsberg, Creator of Typescript and C# Interview:
π Stackoverflow Survey Results: #technology-most-popular-technologies
π MDN - Static Typing:
π MDN - Dynamic Typing:
π MDN - Type Coercion:
π TS Type Assertions: #type-assertions
β Web Dev Tools:
π Chrome Browser:
π Visual Studio Code (VS Code):
π & npm:
π Live Server VS Code Extension:
Was this Typescript Index Signatures, keyof Assertions & Record utility type tutorial helpful? If so, please share. Let me know your thoughts in the comments.
#typescript #index #signatures