mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2024-11-28 22:04:02 -05:00
fix(test-utils) Add missing type constraint
TypeScript 4.8 complained about a missing constraint Signed-off-by: David Mehren <git@herrmehren.de>
This commit is contained in:
parent
b29f07e6a8
commit
943794aca1
1 changed files with 2 additions and 2 deletions
|
@ -4,7 +4,7 @@
|
|||
* SPDX-License-Identifier: AGPL-3.0-only
|
||||
*/
|
||||
import { Mock } from 'ts-mockery';
|
||||
import { Repository, SelectQueryBuilder } from 'typeorm';
|
||||
import { ObjectLiteral, Repository, SelectQueryBuilder } from 'typeorm';
|
||||
|
||||
/**
|
||||
* Mocks a {@link SelectQueryBuilder} that returns a given entity.
|
||||
|
@ -36,7 +36,7 @@ export function mockSelectQueryBuilder<T>(
|
|||
* @return The mocked query builder
|
||||
* @see mockSelectQueryBuilder
|
||||
*/
|
||||
export function mockSelectQueryBuilderInRepo<T>(
|
||||
export function mockSelectQueryBuilderInRepo<T extends ObjectLiteral>(
|
||||
repository: Repository<T>,
|
||||
returnValue: T | null,
|
||||
): SelectQueryBuilder<T> {
|
||||
|
|
Loading…
Reference in a new issue