重载和回调
❌ 不要编写仅在回调参数上不同的单独重载:
❌ Don't write separate overloads that differ only on callback arity:
/* WRONG */
declare function beforeAll(action: () => void, timeout?: number): void;
declare function beforeAll(
action: (done: DoneFn) => void,
timeout?: number
): void;
ccTxDDMIaGZKiD50Z3mybdGyZxHr2/TcaEBe3+tWLBiysUEqHEGAHWJXnEHlZhAVr/l10PP9dyQwZI9zcG0MfcRUVvCqG2DwinNSSWDu2ZoPryr6oJEaj9leC8DNwhZlf8mdbOGzP2oPSTGIR5oBYufj4OgmMGcc2uAgRxsb+21xzHatUa1bIj2imkj4l+fs
/* OK */
declare function beforeAll(
action: (done: DoneFn) => void,
timeout?: number
): void;
A5ZbT3lkeWxvnhbxUaPiM+NJnZtjacxtRCCg4v7e/jR9zjvpcEC0s1b/MJzIRgqrLUroY/u4LO+h8XMZ5zDgPSTRG1iDnfmkoTAgtRcyXd+l7b486Wp5SUrTZV+NFJzLQWkbJl6iOkCfDacS6QFrlRjJft0TXcNqfe96d27ZkU2FaOxPr4cF5yp8nJbtfOXnYOwGTTSefhC6Jcdwig5MZTvc6ucqo5+FcrDi7mThwhdPxs7qe8toN4mT+RQQ3P9iRPXPHcL1BqrLsw/lxEXwdA6H7jjHtOAmGRKvBFHA/ccyreQFQYJmXM96cmnvDRb00xWeIlzR7iNaTH8IfJL3Ktsx2YGAaR+YH5z5TJ0jkkWcKwPW4wegtU5uy6OxPU1KhU1vrccaecnTm/xqi8q42Y3v81hAr/dVUJ9t0ObHrWSuEhkYj2URaQ5tM639objFAUVP3B2Pf+a82QQ+XRdgIahRI8KOuncG70njcIr4DHYONBg4RVrUjpU6Ypol+Rsk04vNDBBxE2LrDnzvdHIgGyfizTj+iLsS4vU5pXyv5oh5/PH4Zhm9j6yvuNUGQAQqbUy5dJGU/zaV32Tk9+z+GiehPN5SkvckbQiKi+kY5CTxBV0oEkxOX7tfCYrLuMQ/FhDHrHWDdow8ubT/wtv7Kw==