The scripting API makes use of errors being available in ECMAScript (e.g., TypeError).
Moreover, also other errors such as NotSupportedError or NotFoundError are used which are not available in ECMAScript. Instead those errors are defined here.
We need to have a good set of errors that work for JavaScript/Typescript and browser environments.
For example, NotSupportedError and NotFoundError need to be defined in TypeScript definitions before they can be used in TS.
The scripting API makes use of errors being available in ECMAScript (e.g.,
TypeError).Moreover, also other errors such as
NotSupportedErrororNotFoundErrorare used which are not available in ECMAScript. Instead those errors are defined here.We need to have a good set of errors that work for JavaScript/Typescript and browser environments.
For example,
NotSupportedErrorandNotFoundErrorneed to be defined in TypeScript definitions before they can be used in TS.