Typescript Generics | Beginners Tutorial with Examples

Pubblicato il: 15 novembre 2022
sul canale di: Dave Gray
22,371
870

Web Dev Roadmap for Beginners (Free!): https://bit.ly/DaveGrayWebDevRoadmap

Learn about Typescript Generics in this Typescript beginners tutorial with examples. Typescript Generics allow for type variables which are helpful when we do not know what type will be passed to a TS function, interface, type alias or class.

🚀 Become a full-stack web dev with Zero To Mastery Courses:
The Complete Web Developer: https://bit.ly/WebDevMaster
Master the Coding Interview: https://bit.ly/FAANGInterview
Junior to Senior Dev Roadmap: https://bit.ly/WebDevRoadmap-JrtoSr

🚩 Subscribe ➜ https://bit.ly/3nGHmNn

📬 Course Updates ➜ https://courses.davegray.codes/

❓ Questions - Please post them to my Discord ➜   / discord  

☕ Buy Me A Coffee ➜ https://www.buymeacoffee.com/davegray

👇 Follow Me On Social Media:
Github: https://github.com/gitdagray
Twitter:   / yesdavidgray  
LinkedIn:   / davidagray  

🔗 All Resources for this Typescript Course: https://github.com/gitdagray/typescri...

🔗 Playlist for this Typescript Course: http://bit.ly/3GcNJ78

Typescript Generics | Beginners Tutorial with Examples

(00:00) Intro
(00:05) Welcome
(00:28) Starter code and set up
(01:33) What are Generics?
(02:02) Basic Example and Syntax
(03:46) isObject example
(05:53) isTrue with keyof Assertion
(11:03) Interface with Generic example
(13:00) Narrowing Generics with Extends
(15:05) Multiple Type Variables & Extends with keyof
(19:43) Class with Generics

📚 Suggested Pre-requisites for this Typescript course:
🔗JavaScript for Beginners full course:    • JavaScript Full Course for Beginners | Com...  

📚 Tutorial References:
🔗 Typescript Official Website: https://www.typescriptlang.org/
🔗 Anders Hejlsberg, Creator of Typescript and C# Interview: https://dev.to/destrodevshow/typescri...
🔗 Stackoverflow Survey Results: https://survey.stackoverflow.co/2022/...
🔗 MDN - Static Typing: https://developer.mozilla.org/en-US/d...
🔗 MDN - Dynamic Typing: https://developer.mozilla.org/en-US/d...
🔗 MDN - Type Coercion: https://developer.mozilla.org/en-US/d...
🔗 TS Type Assertions: https://www.typescriptlang.org/docs/h...

⚙ Web Dev Tools:
🔗 Chrome Browser: https://www.google.com/chrome/
🔗 Visual Studio Code (VS Code): https://code.visualstudio.com/
🔗 Node.js & npm: https://nodejs.org/
🔗 Live Server VS Code Extension: https://marketplace.visualstudio.com/...

Was this Typescript Generics tutorial helpful? If so, please share. Let me know your thoughts in the comments.

#typescript #generics #tutorial


In questa pagina del sito puoi guardare il video online Typescript Generics | Beginners Tutorial with Examples della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Dave Gray 15 novembre 2022, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 22,371 volte e gli è piaciuto 870 spettatori. Buona visione!