Replies: 1 comment
-
释义:为同一个函数提供多个函数类型定义 function fn(param1: String, param2: String) { console.log('x') }
function fn(param1: Number, param2: Number) { console.log('y') }
fn('1', '2'); // x
fn(1, 2); // y 温馨提示:隐君子arguments |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
在 TypeScript 中如何实现函数重载?
Beta Was this translation helpful? Give feedback.
All reactions