Posts filtered by the tag typescript
March 24, 2025
Sometimes you don’t really know what error your backend or API is providing so Typescript will question the type on your try...catch block your using so this are the different types you can use.
March 19, 2025
Type utilities you can use to transform types or make them more reusable. These are set of built-in generic types.
February 26, 2025
Narrowing refers to the process of refining the type of a variable or expression based on certain condition. It’s allow us to filter more specific assertions about the type of a value enabling better type checking.
September 19, 2024
When do we use type vs interface? Which should we use? When do we use type and interface? And why I’m starting my post like this? I read too many self-help books I guess.
September 13, 2024
What if our data is coming from an API? How do we ensure we have type-safe on our `async` function data?
October 21, 2023
Here are some basic type and useful prop types when using Typescript in React.
August 20, 2023
Literal Types allow you to SPECIFY that a variable or parameter MUST HAVE A PARTICULAR value
August 10, 2023
Sometimes you will have information about the type of value that TS can’t know about. Type assertions are used to explicitly specify the type of a value when the TS compiler is unable to infer it automatically.
July 25, 2023
Interface declaration is another way to name an object type.
July 22, 2023
Type aliases are a way of creating a custom name for your type variables, functions and objects for reusability and readability.