Closed cqh963852 closed 5 years ago
function Test<T>(fn: (a: T) => void, a: T): void; function Test(fn: () => void): void; function Test(fn: any, a?: any) { if(a!=null){ fn(a); }else{ fn(); } } function fun() {} const a = 1; Test(fun,a);
The fun function is ()=>void but The tslint won't tell me fun is not assign to (a:T)=>void
fun
()=>void
(a:T)=>void
This sounds like a regular TS question, not a tslint issue.
Please ask this on StackOverflow or file an issue against TypeScript
The
fun
function is()=>void
but The tslint won't tell mefun
is not assign to(a:T)=>void