Skip to content

Commit

Permalink
feat: export collection page params type
Browse files Browse the repository at this point in the history
  • Loading branch information
DASPRiD committed May 13, 2024
1 parent 30ee43c commit 1f6d398
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
13 changes: 7 additions & 6 deletions src/deserializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -187,15 +187,16 @@ export type NullableResourceDocumentResult<TDeserializer extends AnyResourceDese
ResourceResult<TDeserializer> | null,
MetaResult<InferDocumentMetaSchema<TDeserializer>>
>;
export type CollectionPageParams = {
first?: PageParams;
prev?: PageParams;
next?: PageParams;
last?: PageParams;
};
export type ResourceCollectionDocumentResult<TDeserializer extends AnyResourceDeserializer> =
DocumentResult<
ResourceResult<TDeserializer>[],
MetaResult<InferDocumentMetaSchema<TDeserializer>>
> & {
pageParams: {
first?: PageParams;
prev?: PageParams;
next?: PageParams;
last?: PageParams;
};
pageParams: CollectionPageParams;
};
1 change: 1 addition & 0 deletions src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ export {
type Selector,
} from "./selector.ts";
export type {
CollectionPageParams,
ResourceCollectionDocumentResult,
NullableResourceDocumentResult,
ResourceDocumentResult,
Expand Down

0 comments on commit 1f6d398

Please sign in to comment.