Skip to main content
Module

x/enzastdlib/decorators/decorator.ts>Decorator

enzastdlib is a set of TypeScript modules that follow a common design API philosophy aiming at sane defaults and ease-of-use targeting the Deno TypeScript runtime.
Latest
interface Decorator
import { type Decorator } from "https://deno.land/x/enzastdlib@v0.0.4/decorators/decorator.ts";

Represents a decorator for accessing scoped metadata on functions made by makeDecorator.

Type Parameters

Func extends FunctionBox
Value

Methods

get(func: Func): Value | undefined

Returns the metadata associated with the specified func, if any.

has(func: Func): boolean

Returns if the specified func has any metadata associated with it.

set(func: Func, value: Value): void

Sets the metadata associated with the specified func to the supplied value.