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

x/netzo/deps/@feathersjs/hooks.ts>hooks

Full-stack Deno framework for building business web apps like internal tools, dashboards, admin panels and automated workflows.
Go to Latest
function hooks
import { hooks } from "https://deno.land/x/netzo@0.4.72/deps/@feathersjs/hooks.ts";

Returns a new function that wraps an existing async function with hooks.

Type Parameters

F
optional
T = any

Parameters

fn: F & (() => void)

The async function to add hooks to.

optional
manager: HookManager

An array of middleware or hook settings (middleware([]).params() etc.)

Add hooks to one or more methods on an object or class.

Parameters

obj: O | (new (...args: any[]) => O)

The object to add hooks to

hookMap: HookMap<O> | AsyncMiddleware[]

A map of middleware settings where the key is the method name.

Decorate a class method with hooks.

Type Parameters

optional
T = any

Parameters

optional
manager: HookOptions

The hooks settings