     /// or `nil` otherwise
     @inlinable
     var templateDecl: String? {
-        guard typeRef.knownIndirectionLevel == 1, let record = knownRecord else {
+        guard let record = knownRecordReference else {
             return nil
         }
         return record.className + "T: " + record.protocolName
     }
+
+    /// return a directly referenced known record, `nil` otherwise
+    @inlinable var knownRecordReference: GIR.Record? {
+        guard typeRef.knownIndirectionLevel == 1 else { return nil }
+        return knownRecord
+    }
+
+    /// return whether the receiver is a direct reference to a known record
+    @inlinable var isKnownRecordReference: Bool { knownRecordReference != nil }
 
     /// return the swift (known) type of the receiver when used as a return value
     @inlinable

        return optionalName
    }

    /// return the swift (known) type of the receiver when passed as an argument
    /// Returns a template name in case of a known record
    @inlinable
    var templateTypeName: String {
        let pointers = typeRef.knownIndirectionLevel
        guard pointers == 1, let record = knownRecord else {
            guard pointers == 0, let optionSet = knownBitfield else {
                return argumentTypeName
            }
            return optionSet.escapedName.swift


    /// explicit, idiomatic type reference (struct if pointer to record)
    @inlinable var idiomaticWrappedRef: TypeReference {
        guard let record = knownRecordReference else {
            guard typeRef.knownIndirectionLevel == 0, let optionSet = knownBitfield else {
                return swiftReturnRef
            }
            return optionSet.typeRef
