在TypeScript 中,如果将函数表达式作为参数传递,则可以完美地推断其参数的类型: var foo = (fn: (a: string) => void) => {}; foo(a => { // a is inferred to be a ...
確定! 回上一頁