Skip to main content
Deno 2 is finally here 🎉️
Learn more
Module

x/windmill/node_modules/tsafe/lab/overwriteReadonlyProp.d.ts>overwriteReadonlyProp

Windmill deno client (separated from the main repo because most of the code is auto-generated from the openapi and not worth committing)
Latest
variable overwriteReadonlyProp
import { overwriteReadonlyProp } from "https://deno.land/x/windmill@v1.426.1/node_modules/tsafe/lab/overwriteReadonlyProp.d.ts";

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 )

type

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