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

# init(withResolvers:mappingTransform:)

Declares support for the contains operator between an Array property and user-supplied values.

## Declaration

```swift
init<Spec>(@ResolverSpecificationBuilder<PropertyType.UnwrappedType> withResolvers resolvers: @escaping () -> Spec, mappingTransform: @escaping (InputType) -> ComparatorMappingType) where PropertyType : _SequenceIntentValue, PropertyType : Sequence, InputType : Equatable, InputType == PropertyType.Element, 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.

## See Also

### Creating a comparator

- [init(mappingTransform:)](appintents/containscomparator/init(mappingtransform:)-xvws.md)
- [init(mappingTransform:)](appintents/containscomparator/init(mappingtransform:)-3xuvt.md)
- [init(mappingTransform:)](appintents/containscomparator/init(mappingtransform:)-7rx55.md)
