This taught me so much about advanced TypeScript
My Angular course: https://angularstart.com/
It feels like there are two different worlds of TypeScript, and more advanced TypeScript can look completely incomprehensible - even if you've been using TypeScript for a long time. This video walks through typing a simple utility from an Angular library, and highlights some advanced TypeScript concepts that might not be as scary as they first seem.
signalSlice source code: https://github.com/nartc/ngxtension-platform/blob/main/libs/ngxtension/signal-slice/src/signal-slice.ts
More on signalSlice: https://www.youtube.com/watch?v=z7zK2u4vBrA
Get weekly content and tips exclusive to my newsletter: https://mobirony.ck.page/4a331b9076
Want to build mobile apps with Angular?: https://ionicstart.com
#typescript #angular
0:00 Introduction
0:36 The Initial API
1:49 The Untyped API
2:06 Generic for initialState
2:55 Typing reducers
4:57 Typing selectors
5:16 The return type
7:55 Conclusion
- More tutorials: https://modernangular.com
- Follow me on Twitter: https://twitter.com/joshuamorony