---
title: "has(_:)"
framework: realitykit
role: symbol
role_heading: Instance Method
path: "realitykit/entity/componentset/has(_:)"
---

# has(_:)

Returns a Boolean value that indicates whether the set contains a component of the given type.

## Declaration

```swift
@MainActor @preconcurrency func has(_ componentType: any Component.Type) -> Bool
```

## Parameters

- `componentType`: A component type, like ModelComponent.Self.

## Return Value

Return Value A Boolean value that’s true if the set contains a component of the given type.
