<!--
{
  "availability" : [
    "macOS: 10.5.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptClassDescription/hasProperty(forKey:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptClassDescription(im)hasPropertyForKey:"
  },
  "title" : "hasProperty(forKey:)"
}
-->

# hasProperty(forKey:)

Returns a Boolean value indicating whether the described class has a property identified by the specified key.

```
func hasProperty(forKey key: String) -> Bool
```

## Parameters

`key`

The identifying key for a property of the receiver.

## Return Value

<doc://com.apple.documentation/documentation/Swift/true> if the described class has a property identified by the specified key; otherwise, <doc://com.apple.documentation/documentation/Swift/false>.

## Discussion

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)