Closed gwhitney closed 2 years ago
O wow, such a handler makes a lot of sense! Even if we would not use it in mathjs on short term, it is a useful addition.
Can you work out this PR please? (add tests+docs)
Thanks for writing docs and tests Glen, looks very neat 👌
Published now in v2.1.0
This way a client can implement custom behavior in the situation that a typed function call does not match any of its signatures. One specific application is to enable symbolic computation in mathjs (see demo PR to come momentarily).
This is not currently recommended for merging, although if the feature is of interest it's close: it would just need documentation, tests, and likely it would be good to expose
createError
as well for potential use in a client'sonMismatch
handler.