Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Type 'Entity' does not satisfy the constraint 'ObjectLiteral' #80

Open
1valdis opened this issue Nov 3, 2023 · 2 comments
Open

Type 'Entity' does not satisfy the constraint 'ObjectLiteral' #80

1valdis opened this issue Nov 3, 2023 · 2 comments

Comments

@1valdis
Copy link

1valdis commented Nov 3, 2023

Running this package with Typescript 4.9 and above results in the following error:

node_modules/typeorm-cursor-pagination/lib/Paginator.d.ts:34:42 - error TS2344: Type 'Entity' does not satisfy the constraint 'ObjectLiteral'.

34     paginate(builder: SelectQueryBuilder<Entity>): Promise<PagingResult<Entity>>;
                                            ~~~~~~

  node_modules/typeorm-cursor-pagination/lib/Paginator.d.ts:18:32
    18 export default class Paginator<Entity> {
                                      ~~~~~~
    This type parameter might need an `extends ObjectLiteral` constraint.

Found 1 error(s).
@1valdis
Copy link
Author

1valdis commented Nov 3, 2023

I see the code in src is correct in the repo, but somehow remains old on npm. @benjamin658 please rebuild and release the package to have the correct code on npm too.

@LightDev1
Copy link

i am also facing this problem

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants