interface Config<C extends DocumentCollection> {
    delete?: (collection: C) => void | Promise<void>;
    preDelete?: (collection: C) => void | Promise<void>;
}

Type Parameters

Properties

Properties

delete?: (collection: C) => void | Promise<void>

Optional post-delete function to invoke when document is deleted after subscribers have been notified.

Type declaration

    • (collection: C): void | Promise<void>
    • Parameters

      • collection: C

        Document collecting being deleted.

      Returns void | Promise<void>

preDelete?: (collection: C) => void | Promise<void>

Optional pre-delete function to invoke when document is deleted before subscribers are notified.

Type declaration

    • (collection: C): void | Promise<void>
    • Parameters

      • collection: C

        Document collecting being deleted.

      Returns void | Promise<void>