Blog

Page 423 of my articles, tutorials, and thoughts

Latest Articles

Cover Image for Import class in definition file (*d.ts)

Import class in definition file (*d.ts)

Published on September 2, 2023

# Import class in definition file (*d.ts) - A Guide for Beginners šŸ‘Øā€šŸ’» Are you having trouble importing a class in a *d.ts file to extend the Express Session typings? Don't worry! This blog post will walk you through common issues and provide easy soluti

Cover Image for TypeScript empty object for a typed variable

TypeScript empty object for a typed variable

Published on September 2, 2023

šŸ“šŸ’» Blog Post: TypeScript Empty Object for a Typed Variable Have you ever found yourself in a situation where you want to create a new object for a typed variable in TypeScript, but setting it as an empty object throws errors or causes unexpected behavio

Cover Image for "tsc command not found" in compiling typescript

"tsc command not found" in compiling typescript

Published on September 2, 2023

# "tsc command not found" - A Simple Guide to Compiling TypeScript šŸ”Ž Are you a TypeScript enthusiast, trying to compile your code but getting stuck with the dreaded "tsc command not found" error? Don't worry, we've got your back! In this guide, we'll wal

Cover Image for using process.env in TypeScript
node.js

using process.env in TypeScript

Published on September 2, 2023

# Using `process.env` in TypeScript: How to Solve the 'Property does not exist' Error So you're working on a TypeScript project and need to read node environment variables? 🌳 Environment variables are a great way to store sensitive or dynamic information

Cover Image for How to disable a ts rule for a specific line?
javascriptjquery

How to disable a ts rule for a specific line?

Published on September 2, 2023

šŸ“ **Tech Blog Post - How to Disable a TypeScript Rule for a Specific Line** šŸ”’ Are you struggling with TypeScript errors, even though you know exactly what you're doing? šŸ¤” Don't worry, we've got you covered! In this blog post, we'll explore a common iss

Cover Image for TypeScript for ... of with index / key?
foreachfor-loop

TypeScript for ... of with index / key?

Published on September 2, 2023

# TypeScript for ... of with index / key? šŸ¤” So you're getting your hands dirty with TypeScript and you stumble upon the `for...of` loop. It seems simple and straightforward, but you quickly realize that it lacks the ability to access the index or key of

Cover Image for Parsing error: Cannot read file ".../tsconfig.json".eslint
node.js

Parsing error: Cannot read file ".../tsconfig.json".eslint

Published on September 2, 2023

# 😱 Parsing error: Cannot read file '.../tsconfig.json'.eslint Are you seeing the error message "Parsing error: Cannot read file '.../tsconfig.json'.eslint" in all your .ts files in the src folder? Don't worry, you're not alone! This error often occurs w

Cover Image for How to get argument types from function in Typescript

How to get argument types from function in Typescript

Published on September 2, 2023

# How to Get Argument Types from Function in TypeScript Have you ever found yourself needing to access the types of the parameters in a TypeScript function? You're not alone! It's a common scenario that can be a bit tricky to figure out at first. In this

Cover Image for What"s the difference between "extends" and "implements" in TypeScript
implements

What"s the difference between "extends" and "implements" in TypeScript

Published on September 2, 2023

## What's the Difference Between 'extends' and 'implements' in TypeScript? So you're writing some TypeScript code and you come across the keywords 'extends' and 'implements'. 🧐 What do they actually mean and how do they affect your code? Let's dive into

Cover Image for "this" implicitly has type "any" because it does not have a type annotation

"this" implicitly has type "any" because it does not have a type annotation

Published on September 2, 2023

# šŸš€ Solving the Implicit `this` Error in TypeScript Are you encountering the error message "'this' implicitly has type 'any' because it does not have a type annotation" when enabling `noImplicitThis` in your `tsconfig.json` file? Don't worry, you're not