How To Handle Errors in JavaScript
HTML-код
- Опубликовано: 27 июл 2024
- Learn to handle errors in synchronous and asynchronous operations in JavaScript and prevent your applications from crashing and provide a better experience for your users.
#javascript #errorhandling #trycatch
hashnode blog post: markmaksi.hashnode.dev/error-...
Github repo: github.com/mmaksi/js-error-ha...
Follow me on X:
/ mmxi47
00:00 intro
00:45 what is an error?
02:48 what is error handling?
03:00 error handling in synchronous operations
04:33 error handling in asynchronous operations - web API functions
07:40 error handling in asynchronous operations - promises
11:45 error handling in asynchronous operations - async/await
14:13 summary of error handling
14:43 outro Наука
What a great tutorial !!!
Sir, how to create Generic types from generic types in Typescript to better understand 3rd party libraries
eg.. Myarrey I've watched your one tutorial regarding "Generics" BTW it is great !!!.
But i want to learn something more advance in order to understand how and why 3rd party write generics.
Thanks in advance Regard: Khan Imran from Pakistan
Thank you Khan. Generics are types, so instead of passing a type like string to a class/function/interface that accepts a generic, you can pass another generic. So it becomes like a chain. To understand 3rd party libraries you need to read the type definition files. Type definition files are files that usually have this naming format *.d.ts
You can read those files whenever you import some type from them by clicking right ctrl button and click on the imported type. Sometimes they are better than the documentations, saving you time and also you practice TypeScript concepts beyond simply typing basic arguments and functions from a package, which is what happens when you use TypeScript most of the time.