MCPcopy
hub / github.com/Narcooo/inkos / invalidateApiPaths

Function invalidateApiPaths

packages/studio/src/hooks/use-api.ts:58–66  ·  view source on GitHub ↗
(paths: ReadonlyArray<string>)

Source from the content-addressed store, hash-verified

56}
57
58export function invalidateApiPaths(paths: ReadonlyArray<string>): void {
59 if (!paths.length || typeof window === "undefined") {
60 return;
61 }
62
63 window.dispatchEvent(new CustomEvent<ApiInvalidateDetail>(API_INVALIDATE_EVENT, {
64 detail: { paths: [...new Set(paths)] },
65 }));
66}
67
68async function readErrorMessage(res: Response): Promise<string> {
69 const contentType = res.headers.get("content-type") ?? "";

Callers 5

handleFanficInitFunction · 0.90
handleSpinoffInitFunction · 0.90
handleImitationInitFunction · 0.90
postApiFunction · 0.85
putApiFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected