Closed jonkoops closed 2 years ago
can you try with i18next v22.0.6 ?
Yeah, that works. But should the fix not be that it is always an instance of Error
? Also this is a breaking change to the types as folks might not be checking for string
values at this time.
For example:
const callback: MultiReadCallback = (err, data) => {
if (err) {
// This will now be a TypeScript error, as 'message' does not exist on type 'string'
console.log(err.message)
}
}
Then it's much more correct :+1:
🐛 Bug Report
The value passed for
CallbackError
is incorrect. According to the type definition it can only be of typeError | null | undefined
, but in the code it's also being passed as astring
in multiple occasions.Expected behavior
In the aforementioned cases the value should be passed as the type
Error
.