Blog
Page 497 of my articles, tutorials, and thoughts
Latest Articles
Typescript Type "string" is not assignable to type
ššš **Hey there, tech enthusiasts!** š±š» Are you getting the error message "Type 'string' is not assignable to type 'Fruit'" when trying to assign a string to a variable of custom type Fruit in TypeScript? š¤ Don't fret! This blog post will guide you
How to watch and reload ts-node when TypeScript files change
š Hey there tech enthusiasts! š©āš»šØāš» Have you ever wanted to run a development server with TypeScript and an Angular application without having to manually transpile your TS files every time? š¤ Well, you're in luck! š In this blog post, we're going
Class type check in TypeScript
š Class Type Check in TypeScript: Detecting Classes and Interfaces š Hey there, tech enthusiasts! š Do you find yourself wondering whether it's possible to check if a variable is a certain class or interface in TypeScript? š¤ You're not alone! Many dev
How to reject in async/await syntax?
# How to Reject in Async/Await Syntax? š So you've just switched your code from using traditional promise syntax to the shiny new `async/await` syntax. You're feeling pretty good about it, but then you run into a problem - how do you properly reject a pr
How to pass optional parameters while omitting some other optional parameters?
# Passing Optional Parameters with Omitted Parameters Do you struggle with passing optional parameters while omitting others? š¤ It's a common issue that often leads to confusion and errors. But fear not, because I have some easy solutions for you! In thi
How do I decide whether @types/* goes into `dependencies` or `devDependencies`?
# How to decide whether @types/* goes into `dependencies` or `devDependencies`? š¤ So you're working on a TypeScript project and you want to add typings for a JavaScript library using the `@types` syntax. Great! But you're wondering whether these typings
How to declare a type as nullable in TypeScript?
š£ Hey there, tech enthusiasts! š Ready to dive into the world of TypeScript? š Today, we'll tackle a common question that many TypeScript developers may have encountered: "How to declare a type as nullable in TypeScript?" š” š Let's start with a scena
Check if value exists in enum in TypeScript
# Check if value exists in enum in TypeScript: A Simplified Guide š If you've ever had to check if a value exists in an enum in TypeScript, you're not alone. It can be a bit tricky and cumbersome to achieve this with clean, readable code. But fear not! I
Use async await with Array.map
# Using async/await with Array.map: A Complete Guide šāØ Do you find yourself scratching your head and wondering why `async/await` and `Array.map` don't seem to play nicely together? Don't worry, you're not alone! Many developers, especially those new to







