function createPerson(name: string, doAction: () => void): void {
console.log(`Hi, my name is ${name}.`);
doAction(); // doAction as a function parameter.
}
// Hi, my name is Bob.
// performs doAction which is waveHands function.
createPerson('Bob', waveHands());
//parameter
type Parameter<T extends (...args: any[]) => any> = T extends (...args: infer P) => any ? P : never;
type paraMeterCheck = Parameter<(a: string, b: string) => void>;