const a: string = "5";
const b: number = 5;
const c: boolean = true;
const d: undefined = undefined;
const e: null = null;
const f: any = true;
const g: false = false;
const h: 2 = 2;
let aa = 123;
aa = "hi" as unknown as number;
function add(x: number, y: number): number {
return x + y;
}
const add1: (x: number, y: number) => number = (x, y) => x + y;
function add4(x: number, y: number): number;
function add4(x, y) {
return x + y;
}
type Add2 = (x: number, y: number) => number;
const add2: Add2 = (x, y) => x + y;
interface Add3 {
(x: number, y: number): number;
}
const add3: Add3 = (x, y) => x + y;
const obj: { lat: number; lon: number } = { lat: 37.5, lon: 127.5 };
const arr: string[] = ["1", "2"];
const arr1: Array<number> = [3, 4, 5];
const arr3 = [];
const tuple: [string, number] = ["5", 6];
tuple.push("hi");
const head = document.querySelector("#head");
const head1 = document.querySelector("#head")!;
if (head) {
head.innerHTML = "hello";
}