Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/batterii/errors
Base error classes for all JS projects in the Batterii Org.
https://github.com/batterii/errors
Last synced: 9 days ago
JSON representation
Base error classes for all JS projects in the Batterii Org.
- Host: GitHub
- URL: https://github.com/batterii/errors
- Owner: Batterii
- Created: 2019-08-12T18:29:47.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2020-02-21T22:33:00.000Z (over 4 years ago)
- Last Synced: 2024-11-01T09:11:08.717Z (18 days ago)
- Language: TypeScript
- Homepage:
- Size: 373 KB
- Stars: 0
- Watchers: 8
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# @batterii/errors
Contains base error classes for errors defined in the Batterii organization.Makes use of [Nani][1] to enable easy and robust run-time checking against error
type heirarchies, which is usually not possible in JavaScript or, by extension,
TypeScript.This exists primarily for [namespacing purposes][2] and will likely only ever
contain a single class, `BatteriiError`, which should be the base class for
every error defined in any package with the Batterii scope, or any open-source
package we might end up having that is maintained by Batterii but is not
released under the scope.If we publish (either publicly or privately) a package called
`@batterii/encode-object`, for example, any errors it defines should derive from
an `EncodeObjectError`, which in turn derives from `BatteriiError`.[1]: https://www.npmjs.com/package/nani
[2]: https://www.npmjs.com/package/nani#namespacing-your-errors