Xoá Comment

This commit is contained in:
lam.pt
2025-08-29 09:44:52 +07:00
parent 4372bcd160
commit 5adb236aef
5 changed files with 169 additions and 0 deletions

44
error.ts Normal file
View File

@@ -0,0 +1,44 @@
function add(a: number, b: number): number {
return a + b
}
const result = add('1', 2);
console.log(result)
let unusedVar: string;
function getString(): number {
return "hello"
}
let neverUsed = 123;
let x: any = "abc";
let y: number = x as number;
let a = 5;
function shadow() {
let a = "shadowed";
return a;
}
function noReturnType() {
return true;
}
interface User {
name: string;
age: number;
}
const user: User = { name: "A", age: "20" };
const arr: number[] = [1, "2", 3];
function unreachable() {
return 1;
console.log("This will never run");
}
function useAny(a: any, b: any): any {
return a + b;
}