mirror of
https://github.com/n8n-io/n8n.git
synced 2024-11-16 01:24:05 -08:00
22 lines
588 B
TypeScript
22 lines
588 B
TypeScript
import superagent = require('superagent');
|
|
import type { 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>;
|
|
}
|
|
}
|