Network Request Taking Too Long? Consider Using "AbortSignal" in JavaScriptAbortSignal, a single object that allows you to communicate with a DOM request (such as a fetch request) and abort it. You just need to know 2 Key Concepts: AbortController: A controller object that can abort one or more DOM requests AbortSignal: A...Jul 30, 2024 · 1 min readmusman.hashnode.dev
Understanding ‘Weakly Typed’ and ‘Strongly Typed’ in TypeScriptTypeScript, a superset of JavaScript, introduces static types to JavaScript, which can either be "weakly typed" or "strongly typed" Weakly Typed In a weakly typed system, the variable of one type can be assigned a value of another type without explic...Jul 29, 2024 · 2 min readmusman.hashnode.dev
What Even Are ‘Types’ in TypeScript? Here’s A Short Post To Understand ItTypes define the kind of values a variable can hold. These can be categorized into 2 broad groups: Primitive types & Composite data types Primitive Types These types are simple to define and can have a range of values: string represents text values ...Jul 26, 2024 · 1 min readmusman.hashnode.dev
How Does ‘Type Inference’ Work? And Why You Need to Know the ‘BCT’ AlgorithmType inference is a feature that allows TypeScript to automatically determine the type of a variable based on the value assigned to it. Type inference only takes place when there is no explicit type annotation available. Here are some of the cases wh...Jul 24, 2024 · 2 min readmusman.hashnode.dev
New to TypeScript? Start Simple by Adding It to Your JavaScript FilesActivate TypeScript by adding // @ts-check at the top of your JavaScript file. With TypeScript active, this will enable warnings and errors in your .js file. We immediately get the red squiggly lines, and upon hovering over the problematic code it ...Jul 22, 2024 · 1 min readmusman.hashnode.dev