diff --git a/package-lock.json b/package-lock.json index fac9c41..67765a7 100644 --- a/package-lock.json +++ b/package-lock.json @@ -31,7 +31,7 @@ "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typeorm": "^0.3.10", - "typescript": "^4.8.4" + "typescript": "^4.9.3" }, "peerDependencies": { "@nestjs/common": "^9.2.0", @@ -7023,9 +7023,9 @@ } }, "node_modules/typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true, "bin": { "tsc": "bin/tsc", @@ -12602,9 +12602,9 @@ } }, "typescript": { - "version": "4.8.4", - "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.8.4.tgz", - "integrity": "sha512-QCh+85mCy+h0IGff8r5XWzOVSbBO+KfeYrMQh7NJ58QujwcE22u+NUSmUxqF+un70P9GXKxa2HCNiTTMJknyjQ==", + "version": "4.9.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-4.9.3.tgz", + "integrity": "sha512-CIfGzTelbKNEnLpLdGFgdyKhG23CKdKgQPOBc+OUNrkJ2vr+KSzsSV5kq5iWhEQbok+quxgGzrAtGWCyU7tHnA==", "dev": true }, "unique-filename": { diff --git a/package.json b/package.json index 95ce612..78adfd1 100644 --- a/package.json +++ b/package.json @@ -49,7 +49,7 @@ "ts-jest": "^29.0.3", "ts-node": "^10.9.1", "typeorm": "^0.3.10", - "typescript": "^4.8.4" + "typescript": "^4.9.3" }, "dependencies": { "lodash": "^4.17.21" diff --git a/src/paginate.ts b/src/paginate.ts index fc9c854..f18d818 100644 --- a/src/paginate.ts +++ b/src/paginate.ts @@ -14,6 +14,7 @@ import { Brackets, Between, FindOptionsWhere, + ObjectLiteral, } from 'typeorm' import { PaginateQuery } from './decorator' import { ServiceUnavailableException, Logger } from '@nestjs/common' @@ -170,7 +171,7 @@ function parseFilter(query: PaginateQuery, config: PaginateConfig) { return filter } -export async function paginate( +export async function paginate( query: PaginateQuery, repo: Repository | SelectQueryBuilder, config: PaginateConfig