Posts Tagged Under: TypeScript

Using Create React App v2 and TypeScript

Now that Create React App v2 is out, official TypeScript support comes with it. This is an exciting thing for JavaScript users that use TypeScript. TypeScript is a powerful tool that helps us write safer and self-documenting code. We can catch bugs faster with TypeScript.

Many people have opinions about TypeScript, good and bad, but it’s a good idea to give it a chance. For this article, we’ll focus on getting a Create React App up with

Read More

Understanding why Semantic HTML is important, as told by TypeScript

What a great technological analogy by Mandy Michael. A reminder that TypeScript…

makes use of static typing so, for example, you can give your variables a type when you write your code and then TypeScript checks the types at compile time and will throw an error if the variable is given a value of a different type.

In other words, you have a variable age that you declare to be a number, the value for age has to stay a number otherwise

Read More

3 Useful TypeScript Tips for Angular

These are the 3 tips I found pretty handy while working with Typescript:

  1. Eliminating the need to import interfaces
  2. Making all interface properties optional
  3. Stop throwing me error, I know what I’m doing

Though I discovered these while working with Angular application, but all tips are not Angular specific, it’s just Typescript.

Eliminating the need to import interfaces

I like interfaces. However, I don’t like to import them everytime. Although Visual Studio Code has auto-import feature, I don’t like my source files been “polluted” by

Read More