mirror of
https://github.com/lensapp/lens.git
synced 2025-05-20 05:10:56 +00:00
chore: extract json-api from core
Signed-off-by: Jari Kolehmainen <jari.kolehmainen@gmail.com>
This commit is contained in:
1 parent
f1f2634490
commit
04a23fc4f9
20 files changed
+164
-55
No files matched your search
@@ -3,14 +3,13 @@
|
||||
* Licensed under MIT License. See LICENSE in root directory for more information.
|
||||
*/
|
||||
import { getInjectable } from "@ogre-tools/injectable";
|
||||
import type { RequestInit, Response } from "@k8slens/node-fetch";
|
||||
import fetch from "@k8slens/node-fetch";
|
||||
|
||||
export type Fetch = (url: string, init?: RequestInit) => Promise<Response>;
|
||||
export type Fetch = typeof fetch;
|
||||
|
||||
const fetchInjectable = getInjectable({
|
||||
id: "fetch",
|
||||
instantiate: () => fetch as Fetch,
|
||||
instantiate: () => fetch,
|
||||
causesSideEffects: true,
|
||||
});
|
||||
|
||||
|
||||
Reference in new issue
Block a user