Callbacks the query loader invokes across the saved-query lifecycle. Hosts implement these to report the actions to telemetry and to keep their own state (a recently-viewed list, say) in sync.

Declared as one interface so the loader's fields, its constructor options and a host's handler bundle all derive from a single contract rather than repeating four signatures three times.

interface QueryLoaderLifecycleHandlers {
    onQueryDeleted?: (queryId: string, deletedQuery?: LightQuery) => void;
}

Properties

Properties

onQueryDeleted?: (queryId: string, deletedQuery?: LightQuery) => void

The deleted query is passed alongside its id where it could be resolved from the loaded list, so hosts can report more than a bare id.