mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-06 22:35:57 +08:00
* Fix Node's path.format() requiring all options The bug manifested during use of path.win32 and path.posix submodules. Both functions required all of the options to exist which is not the case as some override others. Further research indicated that previous Node versions were also susceptible, up to v4. I've used the Typescript's Partial<> type which makes all properties optional, allowing for easier maintenance and readabillity at the cost of now requiring Typescript 2.1, which I believe is a good trade-off. * Revert the decision to use TS 2.1 in @types/node Updating Typescript version would require to update all other types that rely on Node, which may be quite a lot. Fixing a bug is not a big enough reason to add new version to all of those packages.