(url: string, options: ClientOptions = {})
| 19 | * @returns A Directus client. |
| 20 | */ |
| 21 | export const createDirectus = <Schema = any>(url: string, options: ClientOptions = {}): DirectusClient<Schema> => { |
| 22 | const globals = options.globals ? { ...defaultGlobals, ...options.globals } : defaultGlobals; |
| 23 | return { |
| 24 | globals, |
| 25 | url: new globals.URL(url), |
| 26 | with(createExtension) { |
| 27 | return { |
| 28 | ...this, |
| 29 | ...createExtension(this), |
| 30 | }; |
| 31 | }, |
| 32 | }; |
| 33 | }; |
no outgoing calls
no test coverage detected