Skip to main content

Showing category results for TypeScript

Posts

0 comments 0 reactions

How TypeScript Infers a Variable’s Type

Jagdish Kumawat

Give a variable a value, and TypeScript infers its type from it: let pages = 320 is a number from then on.

  • Programming
  • TypeScript
0 comments 0 reactions

Converting Strings to JSON Objects in TypeScript

Jagdish Kumawat

JSON.parse works in TypeScript just as in JavaScript: it turns a JSON string into an object or an array, and throws a SyntaxError for invalid JSON.

  • Programming
  • JSON
  • TypeScript