---
title: "ComposableInferredTargetConstraints"
description: "An annotation generated by the Compose compiler plugin."
type: "class"
---
## API Reference

> Source set: Common

```kotlin
public annotation class ComposableInferredTargetConstraints(
    val positional: String,
    val indexed: String,
)
```

An annotation generated by the Compose compiler plugin. Do not use explicitly.

The Compose compiler plugin generates this annotation to supplement [ComposableInferredTarget](/jetpack-compose/androidx.compose.runtime/runtime/classes/ComposableInferredTarget/api)
annotations on functions that are themselves, or have lambda parameters that are, only compatible
with a limited set of appliers.

This is intended to only be generated by the plugin and should not be used directly. Use
[ComposableTarget](/jetpack-compose/androidx.compose.runtime/runtime/classes/ComposableTarget/api) to explicitly indicate that a function is only compatible with a limited set
of appliers instead.

For example, a function that has:
1) a body and a single lambda parameter that expect the same applier, where that applier is only
allowed to have the name "WComposable" or "XComposable"
2) a return type that is a lambda whose body expects an applier that has the name "YComposable"
or "ZComposable"

would have the following annotations added to it by the compiler plugin:
```

The indices in the [ComposableInferredTarget](/jetpack-compose/androidx.compose.runtime/runtime/classes/ComposableInferredTarget/api) annotation work the same way as indices of
[ComposableOpenTarget](/jetpack-compose/androidx.compose.runtime/runtime/classes/ComposableOpenTarget/api). The body and lambda parameter of the function have the same index, 0, so
the compiler encodes the set of appliers that they are compatible with at index 0 of `indexed`.
The body of the return type does not have an index, so the compiler encodes the set of appliers
that it is compatible with in `positional`.

If the `indexed` argument is empty, it means that there are no constraints on any indexed parts
of the annotated function. If the `positional` argument is empty, it means that there are no
constraints on any non-indexed parts of the annotated function.
