mirror of
https://github.com/hedgedoc/hedgedoc.git
synced 2025-05-23 11:37:02 -04: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
|
* SPDX-License-Identifier: AGPL-3.0-only
|
||||||
*/
|
*/
|
||||||
import { Mock } from 'ts-mockery';
|
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.
|
* Mocks a {@link SelectQueryBuilder} that returns a given entity.
|
||||||
|
@ -36,7 +36,7 @@ export function mockSelectQueryBuilder<T>(
|
||||||
* @return The mocked query builder
|
* @return The mocked query builder
|
||||||
* @see mockSelectQueryBuilder
|
* @see mockSelectQueryBuilder
|
||||||
*/
|
*/
|
||||||
export function mockSelectQueryBuilderInRepo<T>(
|
export function mockSelectQueryBuilderInRepo<T extends ObjectLiteral>(
|
||||||
repository: Repository<T>,
|
repository: Repository<T>,
|
||||||
returnValue: T | null,
|
returnValue: T | null,
|
||||||
): SelectQueryBuilder<T> {
|
): SelectQueryBuilder<T> {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue