Skip to main content
Go to Latest
method EventEmitter.prototype.passOnlyDetail
import { EventEmitter } from "https://deno.land/x/evtemitter@v3.0.0/EventEmitter.ts";

Creates a wrapper function around a given callback which passes the value of the detail property of a CustomEvent to the callback

Type Parameters

Ev extends ReservedOrUserEventNames<ReservedEvents, UserEvents>

Parameters

callback: ReservedOrUserListenerOn<ReservedEvents, UserEvents, Ev>

the callback to wrap