<!--
{
  "availability" : [
    "macCatalyst: 13.0.0 -",
    "macOS: 10.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "Foundation",
  "identifier" : "/documentation/Foundation/NSScriptCommandDescription/typeForArgument(withName:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "Foundation"
    ],
    "preciseIdentifier" : "c:objc(cs)NSScriptCommandDescription(im)typeForArgumentWithName:"
  },
  "title" : "typeForArgument(withName:)"
}
-->

# typeForArgument(withName:)

Returns the type of the command argument identified by the specified key.

```
func typeForArgument(withName argumentName: String) -> String?
```

## Parameters

`argumentName`

Argument name (used as a key) that identifies the command argument to examine.

## Return Value

The type of the specified command argument. Returns `nil` if there is no such argument.

---

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)