chessops icon indicating copy to clipboard operation
chessops copied to clipboard

@badrap/result is leaky

Open jonbgamble opened this issue 2 months ago • 0 comments

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.

jonbgamble avatar Oct 18 '25 17:10 jonbgamble