type cb = (str: string) => void
let demo1:cb=(str:string) => {return "anything"} //correct
let demo2:cb=(num:number) => {return "anything"} //error Type 'string' is not assignable to type 'number'.
let demo3:cb=() => {return "anything"} //correct, why?
I want to restrict the param not empty ,someting error like this:
let demo:cb=() => {return "anything"} //error , the param is required