1.函数1.1 重载1234567891011121314function add(num1: number, num2: number): number; // 没函数体function add(num1: string, num2: string): string;function add(num1: any, num2: any): any { if (typeof num1 === 'string' && typeof num2 === 'string') { return num1.length + num2.length } return num1 + num2}const result = add(20, 30)const result2 = add("abc", "cba")console.log(result)console.log(result2) 2.Type12345678910111213141516171819202122232425262728293031/** type A = { aa:string Bb:string cc_Dd:strng } type B = { aa:string bb:string ccDd:string } 写一个camel类型完成这种转换 */type A = { aa: string Bb: string cc_Dd: string cc_dd_ee: boolean}type CamelCase<Str extends string> = Str extends `${infer left}_${infer rest}` ? `${left}${rest extends `${infer left1}_${infer rest2}` ? CamelCase<Capitalize<string & rest>> : Capitalize<string & rest>}` : Lowercase<string & Str>type camel<obj> = { [key in keyof obj as CamelCase<string & key>]: obj[key]}type res = camel<A>