Skip to the content.

Function: getOptionalField()

getOptionalField(obj, field, expectedType): unknown

Defined in: performance.ts:102

Optimized field access for optional fields.

Parameters

obj

Readonly<UnknownRecord>

field

string

expectedType

"string" | "number" | "boolean" | "object"

Returns

unknown