perf(tooling): Upgrade to TypeScript 4.8 (#4207)
* ⬆️ Upgrade to TypeScript 4.8 * 🔥 Remove unneeded setting * 📦 Update `package-lock.json` * ⏪ Restore `skipLibCheck` * 📦 Re-update `package-lock.json` * ♻️ Apply feedback * ♻️ Add check to new WhatsApp node * 📦 Update `package-lock.json` * Update package-lock.json * ran `npm run lintfix` Co-authored-by: कारतोफ्फेलस्क्रिप्ट™ <aditya@netroy.in>
This commit is contained in:
@@ -101,7 +101,7 @@
|
||||
"supertest": "^6.2.2",
|
||||
"ts-jest": "^27.1.3",
|
||||
"ts-node": "^8.9.1",
|
||||
"typescript": "~4.6.0"
|
||||
"typescript": "~4.8.0"
|
||||
},
|
||||
"dependencies": {
|
||||
"@oclif/command": "^1.5.18",
|
||||
|
||||
@@ -13,6 +13,7 @@ import {
|
||||
EntityTarget,
|
||||
getRepository,
|
||||
LoggerOptions,
|
||||
ObjectLiteral,
|
||||
Repository,
|
||||
} from 'typeorm';
|
||||
import { TlsOptions } from 'tls';
|
||||
@@ -38,7 +39,9 @@ export async function transaction<T>(fn: (entityManager: EntityManager) => Promi
|
||||
return connection.transaction(fn);
|
||||
}
|
||||
|
||||
export function linkRepository<Entity>(entityClass: EntityTarget<Entity>): Repository<Entity> {
|
||||
export function linkRepository<Entity extends ObjectLiteral>(
|
||||
entityClass: EntityTarget<Entity>,
|
||||
): Repository<Entity> {
|
||||
return getRepository(entityClass, connection.name);
|
||||
}
|
||||
|
||||
@@ -183,9 +186,12 @@ export async function init(
|
||||
}
|
||||
}
|
||||
|
||||
// @ts-ignore
|
||||
collections.Credentials = linkRepository(entities.CredentialsEntity);
|
||||
// @ts-ignore
|
||||
collections.Execution = linkRepository(entities.ExecutionEntity);
|
||||
collections.Workflow = linkRepository(entities.WorkflowEntity);
|
||||
// @ts-ignore
|
||||
collections.Webhook = linkRepository(entities.WebhookEntity);
|
||||
collections.Tag = linkRepository(entities.TagEntity);
|
||||
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
import express from 'express';
|
||||
|
||||
import { FindManyOptions, In } from 'typeorm';
|
||||
import { FindManyOptions, In, ObjectLiteral } from 'typeorm';
|
||||
|
||||
import { ActiveWorkflowRunner, Db } from '../../../..';
|
||||
import config = require('../../../../../config');
|
||||
@@ -110,7 +110,7 @@ export = {
|
||||
let workflows: WorkflowEntity[];
|
||||
let count: number;
|
||||
|
||||
const query: FindManyOptions<WorkflowEntity> = {
|
||||
const query: FindManyOptions<WorkflowEntity> & { where: ObjectLiteral } = {
|
||||
skip: offset,
|
||||
take: limit,
|
||||
where: {
|
||||
|
||||
Reference in New Issue
Block a user