3 ms·
Well, typescript doesn't solve this because "passing callback function that doesn't use all provided parameters" is so common in JS world that it would cause mu
by mpawelski 6y ago
Well, typescript doesn't solve this because "passing callback function that doesn't use all provided parameters" is so common in JS world that it would cause much hurdle when migrating JS project or when writing idiomatic JS code.
But I definitely can image typescript could provide another "strict" (or even something outside of "strict" group, like recent "pedantic" option for index access [1]) option that would check against that potential errors.
[1] https://github.com/microsoft/TypeScript/pull/39560 https://github.com/microsoft/TypeScript/pull/39560