> ## Documentation Index
> Fetch the complete documentation index at: https://wb-21fd5541-drtangible-wip-test-inline-tag.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# op

> TypeScript SDK reference

## Call Signature

> **op**\<`T`>(`fn`, `options?`): [`Op`](../type-aliases/op)\<`T`>

Defined in: [src/op.ts:392](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/op.ts#L392)

### Type Parameters

#### T

`T` *extends* (...`args`) => `any`

### Parameters

#### fn

`T`

#### options?

##### attributes?

`Record`\<`string`, `any`>

Default attributes applied to every call this op creates. Integrations set
this to stamp `attributes.integration` provenance. Merged beneath `kind`/
`color`, which take precedence on key collision.

##### bindThis?

[`WeaveObject`](../classes/weaveobject)

##### callDisplayName?

(...`args`) => `string`

##### isDecorator?

`boolean`

##### name?

`string`

##### opColor?

`string`

Custom color for the operation in the UI

##### opKind?

`string`

The kind of operation (e.g., 'llm', 'agent', 'tool', 'search') for UI categorization

##### originalFunction?

`T`

##### parameterNames?

`"useParam0Object"` | `string`\[]

##### shouldAdoptThis?

`boolean`

##### streamReducer?

\{ `finalizeFn`: (`state`) => `void`; `initialStateFn`: () => `any`; `reduceFn`: (`state`, `chunk`) => `any`; }

##### streamReducer.finalizeFn

(`state`) => `void`

##### streamReducer.initialStateFn

() => `any`

##### streamReducer.reduceFn

(`state`, `chunk`) => `any`

##### summarize?

(`result`) => `Record`\<`string`, `any`>

### Returns

[`Op`](../type-aliases/op)\<`T`>

## Call Signature

> **op**\<`T`>(`thisArg`, `fn`, `options?`): [`Op`](../type-aliases/op)\<`T`>

Defined in: [src/op.ts:397](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/op.ts#L397)

### Type Parameters

#### T

`T` *extends* (...`args`) => `any`

### Parameters

#### thisArg

`any`

#### fn

`T`

#### options?

##### attributes?

`Record`\<`string`, `any`>

Default attributes applied to every call this op creates. Integrations set
this to stamp `attributes.integration` provenance. Merged beneath `kind`/
`color`, which take precedence on key collision.

##### bindThis?

[`WeaveObject`](../classes/weaveobject)

##### callDisplayName?

(...`args`) => `string`

##### isDecorator?

`boolean`

##### name?

`string`

##### opColor?

`string`

Custom color for the operation in the UI

##### opKind?

`string`

The kind of operation (e.g., 'llm', 'agent', 'tool', 'search') for UI categorization

##### originalFunction?

`T`

##### parameterNames?

`"useParam0Object"` | `string`\[]

##### shouldAdoptThis?

`boolean`

##### streamReducer?

\{ `finalizeFn`: (`state`) => `void`; `initialStateFn`: () => `any`; `reduceFn`: (`state`, `chunk`) => `any`; }

##### streamReducer.finalizeFn

(`state`) => `void`

##### streamReducer.initialStateFn

() => `any`

##### streamReducer.reduceFn

(`state`, `chunk`) => `any`

##### summarize?

(`result`) => `Record`\<`string`, `any`>

### Returns

[`Op`](../type-aliases/op)\<`T`>

## Call Signature

> **op**(`target`, `propertyKey`, `descriptor`): `TypedPropertyDescriptor`\<`any`>

Defined in: [src/op.ts:403](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/op.ts#L403)

### Parameters

#### target

`object`

#### propertyKey

`string` | `symbol`

#### descriptor

`TypedPropertyDescriptor`\<`any`>

### Returns

`TypedPropertyDescriptor`\<`any`>

## Call Signature

> **op**\<`T`>(`value`, `context`): [`Op`](../type-aliases/op)\<`T`>

Defined in: [src/op.ts:409](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/op.ts#L409)

### Type Parameters

#### T

`T` *extends* (...`args`) => `any`

### Parameters

#### value

`T`

#### context

##### access?

\{ `get`: `Function`; `has`: `boolean`; }

##### access.get

##### access.has

##### class?

`Function`

##### kind

`"method"`

##### metadata?

`any`

##### name

`string` | `symbol`

##### private?

`boolean`

##### static?

`boolean`

##### addInitializer?

### Returns

[`Op`](../type-aliases/op)\<`T`>

## Call Signature

> **op**(`options`): `MethodDecorator`

Defined in: [src/op.ts:414](https://github.com/wandb/weave/blob/7c9efdc9fe05ffcaf2430dd652ef9bc5b3ffdfaa/sdks/node/src/op.ts#L414)

### Parameters

#### options

`Partial`\<`OpOptions`\<`any`>>

### Returns

`MethodDecorator`
