fix: issues that comes out when using TypeScript >= 4.8 (#386)
This commit is contained in:
parent
bb38270b97
commit
9743dc1bdd
14
package-lock.json
generated
14
package-lock.json
generated
@ -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": {
|
||||
|
@ -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"
|
||||
|
@ -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<T>(query: PaginateQuery, config: PaginateConfig<T>) {
|
||||
return filter
|
||||
}
|
||||
|
||||
export async function paginate<T>(
|
||||
export async function paginate<T extends ObjectLiteral>(
|
||||
query: PaginateQuery,
|
||||
repo: Repository<T> | SelectQueryBuilder<T>,
|
||||
config: PaginateConfig<T>
|
||||
|
Loading…
Reference in New Issue
Block a user