Skip to content

getField

getField<Desc>(message, field): Message | ScalarValue | MessageShape<Desc>[keyof MessageShape<Desc>] | undefined

Gets the value of the field on a message. If the field is a oneof, the value is returned from the oneof field. If the field is not a oneof, the value is returned from the field directly.

Desc extends DescMessage

MessageShape<Desc>

DescField

Message | ScalarValue | MessageShape<Desc>[keyof MessageShape<Desc>] | undefined