Skip to content

Commit cb2a19e

Browse files
committed
Default PaginationOptions on AutoPaginatable (#1369)
## Description This pull request introduces a minor improvement to the `AutoPaginatable` class in `src/common/utils/pagination.ts`. The change sets a default type for the `ParametersType` generic parameter, making the class easier to use when the default `PaginationOptions` are sufficient. * TypeScript Improvement: * Set a default value for the `ParametersType` generic parameter to `PaginationOptions` in the `AutoPaginatable` class, simplifying instantiation when custom options are not needed. ## Documentation Does this require changes to the WorkOS Docs? E.g. the [API Reference](https://workos.com/docs/reference) or code snippets need updates. ``` [ ] Yes ``` If yes, link a related docs PR and add a docs maintainer as a reviewer. Their approval is required.
1 parent 87a0553 commit cb2a19e

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/common/utils/pagination.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ import { List, PaginationOptions } from '../interfaces';
22

33
export class AutoPaginatable<
44
ResourceType,
5-
ParametersType extends PaginationOptions,
5+
ParametersType extends PaginationOptions = PaginationOptions,
66
> {
77
readonly object = 'list' as const;
88
readonly options: ParametersType;

0 commit comments

Comments
 (0)