File tree 2 files changed +3
-3
lines changed
2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -515,11 +515,11 @@ export class DataSource {
515
515
/**
516
516
* Executes raw SQL query and returns raw database results.
517
517
*/
518
- async query (
518
+ async query < T = any > (
519
519
query : string ,
520
520
parameters ?: any [ ] ,
521
521
queryRunner ?: QueryRunner ,
522
- ) : Promise < any > {
522
+ ) : Promise < T > {
523
523
if ( InstanceChecker . isMongoEntityManager ( this . manager ) )
524
524
throw new TypeORMError ( `Queries aren't supported by MongoDB.` )
525
525
Original file line number Diff line number Diff line change @@ -170,7 +170,7 @@ export class EntityManager {
170
170
/**
171
171
* Executes raw SQL query and returns raw database results.
172
172
*/
173
- async query ( query : string , parameters ?: any [ ] ) : Promise < any > {
173
+ async query < T = any > ( query : string , parameters ?: any [ ] ) : Promise < T > {
174
174
return this . connection . query ( query , parameters , this . queryRunner )
175
175
}
176
176
You can’t perform that action at this time.
0 commit comments