chore: fix typescript hallucinations (#4559)
This commit is contained in:
committed by
Alessio Gravili
parent
b62cb157e1
commit
8c1df551ef
@@ -273,13 +273,6 @@ export class BasePayload<TGeneratedTypes extends GeneratedTypes> {
|
|||||||
[slug: string]: any // TODO: Type this
|
[slug: string]: any // TODO: Type this
|
||||||
} = {}
|
} = {}
|
||||||
|
|
||||||
delete<T extends keyof TGeneratedTypes['collections']>(
|
|
||||||
options: DeleteOptions<T>,
|
|
||||||
): Promise<BulkOperationResult<T> | TGeneratedTypes['collections'][T]> {
|
|
||||||
const { deleteLocal } = localOperations
|
|
||||||
return deleteLocal<T>(this, options)
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description delete one or more documents
|
* @description delete one or more documents
|
||||||
* @param options
|
* @param options
|
||||||
@@ -293,11 +286,17 @@ export class BasePayload<TGeneratedTypes extends GeneratedTypes> {
|
|||||||
options: DeleteManyOptions<T>,
|
options: DeleteManyOptions<T>,
|
||||||
): Promise<BulkOperationResult<T>>
|
): Promise<BulkOperationResult<T>>
|
||||||
|
|
||||||
|
delete<T extends keyof TGeneratedTypes['collections']>(
|
||||||
|
options: DeleteOptions<T>,
|
||||||
|
): Promise<BulkOperationResult<T> | TGeneratedTypes['collections'][T]> {
|
||||||
|
const { deleteLocal } = localOperations
|
||||||
|
return deleteLocal<T>(this, options)
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @description Initializes Payload
|
* @description Initializes Payload
|
||||||
* @param options
|
* @param options
|
||||||
*/
|
*/
|
||||||
// @ts-expect-error // TODO: TypeScript hallucinating again. fix later
|
|
||||||
async init(options: InitOptions): Promise<Payload> {
|
async init(options: InitOptions): Promise<Payload> {
|
||||||
this.logger = Logger('payload', options.loggerOptions, options.loggerDestination)
|
this.logger = Logger('payload', options.loggerOptions, options.loggerDestination)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user