A plan to add documented types via a separate library so that exception handling can be applied to functions provided by the language itself is needed.
Such as DOM API (i.e.fetch function) or Node.js API etc.
https://github.com/Xvezda/types-with-exceptions