UNPKG

deleight

Version:

A library with 9 modules for writing more expressive web applications with traditional HTML, CSS and JavaScript.

32 lines (31 loc) 790 B
/** * A proxy object which calls a wrapped function when object operations * (like get, set and delete) are done on it, using the specified * key as the first parameter. * * Pending tests. Please report bugs. * * @module */ import { IKey } from "../../types.js"; export interface IDynamic { (key: IKey, ...args: any[]): any; } /** * A proxy object which calls a wrapped function when object operations * (like get, set and delete) are done on it, using the specified * key as the first parameter. * * This can be used to create 'dynamic' getters, setters and 'deleters'. * * Pending tests. Please report bugs. * * @example * * */ export declare function Dynamic(fn: IDynamic): IDynamic; /** * Alias for {@link Dynamic} */ export declare const dyn: typeof Dynamic;