Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback


🔩 The missing TypeScript utils
Go to Latest
variable overwriteReadonlyProp
import { overwriteReadonlyProp } from "";

Assign a value to a property even if the object is freezed or if the property is not writable Throw if the assignation fail ( for example if the property is non configurable write: false )


<T extends { [key: string]: any; }, K extends keyof T>(
obj: T,
propertyName: K,
value: T[K],
) => T[K]