---
title: "init(withResolvers:mappingTransform:)"
framework: appintents
role: symbol
role_heading: Initializer
path: "appintents/containscomparator/init(withresolvers:mappingtransform:)-83nih"
---

# init(withResolvers:mappingTransform:)

Declares support for the contains operator between a AttributedString property and user-supplied values.

## Declaration

```swift
init<Spec>(@ResolverSpecificationBuilder<AttributedString.UnwrappedType> withResolvers resolvers: @escaping () -> Spec, mappingTransform: @escaping (InputType) -> ComparatorMappingType) where Property : EntityProperty<AttributedString>, PropertyType == AttributedString, InputType == AttributedString, Spec : ResolverSpecification
```

## Parameters

- `resolvers`: Set of Resolvers to apply when converting user input to the target Value type.
- `mappingTransform`: Closure that transforms the user-supplied value into the ComparatorMappingType output type.
