mirror of
https://github.com/n8n-io/n8n.git
synced 2024-12-28 22:19:41 -08:00
22 lines
583 B
TypeScript
22 lines
583 B
TypeScript
import superagent = require('superagent');
|
|||
import { ObjectLiteral } from 'typeorm';
|
|||
|
|||
/**
|
|||
* Make `SuperTest<T>` string-indexable.
|
|||
*/
|
|||
declare module 'supertest' {
|
|||
interface SuperTest<T extends superagent.SuperAgentRequest>
|
|||
extends superagent.SuperAgent<T>,
|
|||
Record<string, any> {}
|
|||
}
|
|||
|
|||
/**
|
|||
* Prevent `repository.delete({})` (non-criteria) from triggering the type error
|
|||
* `Expression produces a union type that is too complex to represent.ts(2590)`
|
|||
*/
|
|||
declare module 'typeorm' {
|
|||
interface Repository<Entity extends ObjectLiteral> {
|
|||
delete(criteria: {}): Promise<void>;
|
|||
}
|
|||
}
|