(paths: ReadonlyArray<string>)
| 56 | } |
| 57 | |
| 58 | export 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 | |
| 68 | async function readErrorMessage(res: Response): Promise<string> { |
| 69 | const contentType = res.headers.get("content-type") ?? ""; |
no outgoing calls
no test coverage detected