Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

How to model Errors #4

Open
nojaf opened this issue Nov 3, 2024 · 2 comments
Open

How to model Errors #4

nojaf opened this issue Nov 3, 2024 · 2 comments

Comments

@nojaf
Copy link
Collaborator

nojaf commented Nov 3, 2024

Hi again,

How do we want to model https://developer.mozilla.org/en-US/docs/Web/API/DOMException?
Just as an interface or do we want to tied this to Error.t somehow?

@jderochervlk
Copy link

jderochervlk commented Nov 3, 2024

In TypeScript there isn't overlap between an Error and a DomException so they should probably be different types in ReScript as well.

@nojaf
Copy link
Collaborator Author

nojaf commented Nov 3, 2024

That is not entirely true it seems: https://github.com/microsoft/TypeScript/blob/0ec4d30a6e2ebbc87292c9829378d4e98de8ef43/src/lib/dom.generated.d.ts#L6397-L6433

Although MDN does not seem to mention this.

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants