Contents

subscript(dynamicMember:)

Accesses the return value of the result, without casting.

Declaration

subscript(dynamicMember keyPath: KeyPath<ResolvedIntentResult.ValueKeyPath, Never>) -> (any IntentValueExpressing)? { get }

Overview

For example:

let result = try await intent.run()

// Checking for nil.
result.value == nil

// Use it to populate other intents
let intent = PayCoffeeIntent.makeIntent(coffee: result.value)

For more information about dynamic-member syntax, see dynamicMemberLookup in The Swift Programming Language.