(
host: ReactiveControllerHost,
options: Accessor<
CreateQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey>
>,
queryClient?: QueryClient,
)
| 108 | private queryClient: QueryClient | undefined |
| 109 | |
| 110 | constructor( |
| 111 | host: ReactiveControllerHost, |
| 112 | options: Accessor< |
| 113 | CreateQueryOptions<TQueryFnData, TError, TData, TQueryData, TQueryKey> |
| 114 | >, |
| 115 | queryClient?: QueryClient, |
| 116 | ) { |
| 117 | const initialClient = queryClient |
| 118 | super(host, createPendingQueryResult(), queryClient) |
| 119 | this.options = options |
| 120 | |
| 121 | if (!initialClient) { |
| 122 | return |
| 123 | } |
| 124 | |
| 125 | if (typeof options === 'function') { |
| 126 | return |
| 127 | } |
| 128 | |
| 129 | const defaulted = this.defaultOptions(initialClient) |
| 130 | const observer = new QueryObserver(initialClient, defaulted) |
| 131 | this.queryClient = initialClient |
| 132 | this.observer = observer |
| 133 | this.assignObserverResult(observer.getOptimisticResult(defaulted)) |
| 134 | } |
| 135 | |
| 136 | protected onConnected(): void { |
| 137 | if (!this.syncClient()) { |
nothing calls this directly
no test coverage detected