t×tecexpressby TeKOcloud
DEv0.7.1
API & types / VUE

txRead.

Reads a nested field path or calls a getter. Missing paths return undefined.

Parameters: item = record, selector = dotted path or getter. Returns unknown; a missing path yields undefined. Getter errors propagate.

ts
function txRead<T>(item: T, selector: TxSelector<T>): unknown
ts
import { txRead } from '@tekocloud.de/tecexpress'
console.log(txRead({ address: { city: 'Berlin' } }, 'address.city')) // Berlin