import type { EndpointInterface } from '@data-client/normalizr'; import { INVALIDATE } from '../../actionTypes.js'; import type { InvalidateAction } from '../../types.js'; export function createInvalidate( endpoint: E, { args }: { args: readonly [...Parameters] }, ): InvalidateAction { return { type: INVALIDATE, key: endpoint.key(...args), }; }