Skip to content

@badrap/result is leaky #191

@jonbgamble

Description

@jonbgamble

for version 16+, consider either:

  • wrap all usage of badrap's Result within a fully defined ChessopsResult object and return that.
  • export { Result } directly from your index.ts. clients could at the minimum import yours and use all the helpers (isErr, etc) without coordinating @badrap/result versions.
  • even better, use a bundler to inline an exact @badrap/result version into chessops sources and export { Result } as before. this way, client package managers won't even install your @badrap/result in a node_modules folder.
  • or just return the real goods and throw exceptions. those are sure to be back in vogue in another 5-10 years.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions