@ooneex/types is a types-only package that collects the common type definitions, unions, and interfaces shared across Ooneex packages. It has no runtime code, so importing from it adds nothing to your bundle. Use it to keep entity shapes, status values, HTTP methods, and paginated results consistent everywhere.
Installation
Add the package with Bun.Usage
Because the package only ships types, you import them withimport type and use them to annotate your own values, functions, and entities.
Use IBase as the common shape for persisted entities, and StatusType to constrain a record’s lifecycle state to a known set of values.
FilterResultType<T> to type the response of any paginated list endpoint, and HttpMethodType (backed by the HTTP_METHODS tuple) to constrain request methods.
ScalarType is a handy union for primitive values, useful when typing loosely-structured records like query params or config maps.
When to use it
- You are building an Ooneex package or app and want entity shapes (
IBase), lifecycle states (StatusType), or paginated responses (FilterResultType<T>) to match across services. - You need a ready-made union for HTTP methods (
HttpMethodType), content encodings (EncodingType), charsets (CharsetType), or primitive scalars (ScalarType). - You want shared types with zero runtime cost, since the package contains no executable code.
- You don’t need it for one-off local types that aren’t shared between packages — define those inline instead.