MCPcopy Create free account
hub / github.com/TanStack/ai / firstObjectArg

Function firstObjectArg

codemods/move-sampling-to-model-options/transform.ts:179–183  ·  view source on GitHub ↗

The first object-literal argument of a call, or undefined.

(node: CallExpression)

Source from the content-addressed store, hash-verified

177
178/** The first object-literal argument of a call, or undefined. */
179function firstObjectArg(node: CallExpression): ObjectExpression | undefined {
180 return node.arguments.find(
181 (a): a is ObjectExpression => a.type === 'ObjectExpression',
182 )
183}
184
185/**
186 * Resolve the provider from a call's first object argument by inspecting its

Callers 1

transformFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected