Skip to content

Commit

Permalink
fix: typing so SelectQueryBuilder.getRawOne may return undefined (#7863)
Browse files Browse the repository at this point in the history
fixes #7449
  • Loading branch information
imnotjames committed Jul 8, 2021
1 parent 50306cf commit 36e5a0c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/query-builder/SelectQueryBuilder.ts
Expand Up @@ -998,7 +998,7 @@ export class SelectQueryBuilder<Entity> extends QueryBuilder<Entity> implements
/**
* Gets first raw result returned by execution of generated query builder sql.
*/
async getRawOne<T = any>(): Promise<T> {
async getRawOne<T = any>(): Promise<T|undefined> {
return (await this.getRawMany())[0];
}

Expand Down

0 comments on commit 36e5a0c

Please sign in to comment.