Skip to content

Function: findProperty() ​

findProperty<T>(properties, reader): T | undefined

Finds the first property of reader's type in a track or object property list and returns it typed, or undefined. Unknown properties keep their raw key-value pair, so a type the model doesn't know is still found.

Type Parameters ​

T ​

T

Parameters ​

properties ​

readonly (KeyValuePair | { toKeyValuePair(): KeyValuePair; })[] | null | undefined

reader ​

PropertyReader<T>

Returns ​

T | undefined

Example ​

ts
const timeout = findProperty(subscribeOk.trackProperties, ObjectDeliveryTimeoutProperty)