@@ -93,6 +93,16 @@ type ExportedDeclarationResolution = {
9393 *
9494 * @example
9595 * ```ts
96+ * const source = `
97+ * import { createAPIClient } from './api';
98+ *
99+ * const api = createAPIClient();
100+ *
101+ * export function App() {
102+ * api.pets.getPets.useQuery();
103+ * }
104+ * `;
105+ *
96106 * const plan = await createTransformPlan(source, id, options);
97107 *
98108 * plan.clients[0]
@@ -110,12 +120,33 @@ type ExportedDeclarationResolution = {
110120 * // callbackName: 'useQuery',
111121 * // ...
112122 * // }
123+ * ```
124+ *
125+ * @example
126+ * ```ts
127+ * const source = `
128+ * import { client } from './client';
129+ *
130+ * export function App() {
131+ * client.pets.getPets.useQuery();
132+ * }
133+ * `;
134+ *
135+ * const plan = await createTransformPlan(source, id, options);
113136 *
114- * plan.inlineUsages [0]
137+ * plan.clients [0]
115138 * // {
116- * // callbackName: 'invalidateQueries',
117- * // callbackLocalName: 'invalidateQueries',
118- * // operationImport: { importPath: './api/services/PetsService' },
139+ * // name: 'client',
140+ * // mode: { type: 'precreated' },
141+ * // ...
142+ * // }
143+ *
144+ * plan.namedUsages[0]
145+ * // {
146+ * // client: { name: 'client' },
147+ * // serviceName: 'pets',
148+ * // operationName: 'getPets',
149+ * // callbackName: 'useQuery',
119150 * // ...
120151 * // }
121152 * ```
0 commit comments