sophiehu36 / ts-practice

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

ts-practice

Type annotations

We(developers) tell Typescript the type

When to use:

When a function returns the 'any' type and we need to clarify the value When we declare a variable on one line then initialize it later When we want a variable to have a type that can't be inferred

Type inference

Typescript guesses the type

When to use

Always!

About


Languages

Language:TypeScript 98.8%Language:HTML 1.2%