Skip to content

Commit

Permalink
fix: add types
Browse files Browse the repository at this point in the history
  • Loading branch information
thewilkybarkid committed Nov 2, 2021
1 parent fccd24d commit 3a0e1a9
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/backend/models/fullReviewDrafts.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import { FullReviewDraft } from './entities';

@Repository(FullReviewDraft)
export class FullReviewDraftModel extends EntityRepository<FullReviewDraft> {
async search(query: string): Promise<any> {
async search(query: string): Promise<unknown> {
const connection = this.em.getConnection();

return await connection.execute(
Expand Down
2 changes: 1 addition & 1 deletion src/backend/models/preprints.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const log = getLogger('backend:model:preprints');

@Repository(Preprint)
export class PreprintModel extends EntityRepository<Preprint> {
async findOneByUuidOrHandle(value: string, params: string[]): Promise<any> {
async findOneByUuidOrHandle(value: string, params: string[]): Promise<Preprint> {
try {
const { id, scheme } = decodePreprintId(value);
return this.findOne({ handle: `${scheme}:${id}` }, params);
Expand Down
2 changes: 1 addition & 1 deletion src/backend/utils/http-errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ class HttpError extends ChainedError {
}

// Adapted from https://github.com/jshttp/http-errors
export function createError(...args: any[]): HttpError {
export function createError(...args: unknown[]): HttpError {
let err: Error;
let msg: string;
let status = 500;
Expand Down

0 comments on commit 3a0e1a9

Please sign in to comment.