- safeSetProperty<T, K extends string | number | symbol>(
object: undefined | null | T,
prop: K,
value: NonNullable<T>[K],
allowWritable?: boolean,
allowAny?: boolean,
): boolean Type Parameters
- T
- K extends string | number | symbol
Parameters
- object: undefined | null | T
- prop: K
- value: NonNullable<T>[K]
- allowWritable: boolean = true
- allowAny: boolean = false
Returns boolean
Set value only if setter exists