---
title: "stateDescriptor(of:)"
framework: coreai
role: symbol
role_heading: Instance Method
path: "coreai/inferencefunctiondescriptor/statedescriptor(of:)"
---

# stateDescriptor(of:)

Returns the descriptor for the specified state.

## Declaration

```swift
func stateDescriptor(of stateName: String) -> InferenceValue.Descriptor?
```

## Parameters

- `stateName`: The name of the state.

## Return Value

Return Value The descriptor for the state, or nil if the function doesn’t have a state with the specified name.

## See Also

### Describing state

- [stateNames](coreai/inferencefunctiondescriptor/statenames.md)
