Some checks failed
Build & Deploy / 🔍 Prepare (push) Successful in 20s
Build & Deploy / 🧪 QA (push) Failing after 34s
Build & Deploy / 🏗️ Build (push) Has started running
Build & Deploy / 🚀 Deploy (push) Has been cancelled
Build & Deploy / 🧪 Smoke Test (push) Has been cancelled
Build & Deploy / ⚡ Lighthouse (push) Has been cancelled
Build & Deploy / 🔔 Notify (push) Has been cancelled
30 lines
754 B
Plaintext
30 lines
754 B
Plaintext
import { ConsoleInterface, FetchInterface, UrlInterface, WebSocketConstructor } from "./globals.cjs";
|
|
|
|
//#region src/types/client.d.ts
|
|
|
|
/**
|
|
* empty directus client
|
|
*/
|
|
interface DirectusClient<Schema> {
|
|
url: URL;
|
|
globals: ClientGlobals;
|
|
with: <Extension extends object>(createExtension: (client: DirectusClient<Schema>) => Extension) => this & Extension;
|
|
}
|
|
/**
|
|
* All used globals for the client
|
|
*/
|
|
type ClientGlobals = {
|
|
fetch: FetchInterface;
|
|
WebSocket: WebSocketConstructor;
|
|
URL: UrlInterface;
|
|
logger: ConsoleInterface;
|
|
};
|
|
/**
|
|
* Available options on the client
|
|
*/
|
|
type ClientOptions = {
|
|
globals?: Partial<ClientGlobals>;
|
|
};
|
|
//#endregion
|
|
export { ClientGlobals, ClientOptions, DirectusClient };
|
|
//# sourceMappingURL=client.d.cts.map |