Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Improve types #22

Open
knightedcodemonkey opened this issue May 27, 2024 · 0 comments
Open

Improve types #22

knightedcodemonkey opened this issue May 27, 2024 · 0 comments

Comments

@knightedcodemonkey
Copy link
Owner

  • Update should use an xor type in regards to code and error, i.e. only one should exist and be required.
  • The error property of UpdateError should be renamed to isError to avoid error.error chains when accessing the error property of an Update.
  • Consider switching interface to type.

Perhaps the first two bullet items should be resolved by making Update be

type Update = {
  codeOrError: string | UpdateError
  map?: SourceMap | null
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant