---
title: "subscript(_:)"
framework: foundation
role: symbol
role_heading: Instance Subscript
path: "foundation/attributedynamiclookup/subscript(_:)"
---

# subscript(_:)

Returns an attributed string key that corresponds to a specified type.

## Declaration

```swift
subscript<T>(_: T.Type) -> T where T : AttributedStringKey { get }
```
