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...1 min read·musman.hashnode.devJul 30, 2024
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...2 min read·musman.hashnode.devJul 29, 2024
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 ...1 min read·musman.hashnode.devJul 26, 2024
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...2 min read·musman.hashnode.devJul 24, 2024
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 ...1 min read·musman.hashnode.devJul 22, 2024