In TypeScript, we can specify data types explicitly using a colon (:).
Common Types
stringnumberbooleanany (Avoid this! It disables TypeScript's safety features).main.ts
const userName: string = "Raffi";const age: number = 20;const isDeveloper: boolean = true;// TypeScript will complain if you try to do this:// userName = 123; // Error: Type 'number' is not assignable to type 'string'.console.log(`User: ${userName}, Age: ${age}`);