Skip to main content
Module

x/tsafe/lab/defineAccessors.ts>defineAccessors

🔩 The missing TypeScript utils
Latest
variable defineAccessors
import { defineAccessors } from "https://deno.land/x/tsafe@v1.6.6/lab/defineAccessors.ts";

type

<T extends Record<string, unknown>, K extends keyof T>(
obj: T,
propertyName: K,
propertyDescriptor: { get?: () => T[K]; set?: (value: T[K]) => void; },
) => void