---
title: "content(forType:)"
framework: journalingsuggestions
role: symbol
role_heading: Instance Method
path: "journalingsuggestions/journalingsuggestion/itemcontent/content(fortype:)"
---

# content(forType:)

Retrieves a suggestion’s contents by returning a structure specific to the given content type.

## Declaration

```swift
func content<Content>(forType content: Content.Type) async throws -> Content? where Content : JournalingSuggestionAsset
```

## Parameters

- `content`: A type conforming to doc://com.apple.JournalingSuggestions/documentation/JournalingSuggestions/JournalingSuggestionAsset protocol.

## Return Value

Return Value An instance of the requested type, if it exists in the suggestion.

## Discussion

Discussion The framework templates this method, where Content is JournalingSuggestionAsset, because the content argument is a Type rather than an enumeration case, or other primitive. note: An error if the journaling suggestions picker encounters an unexpected issue.

## See Also

### Accessing suggestion data by type

- [hasContent(ofType:)](journalingsuggestions/journalingsuggestion/itemcontent/hascontent(oftype:).md)
