Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

directive

Returns an optimized and cached function for use with tw.

tw caches rules based on the function identity. This helper caches the function based on the data.

const directive: <Data, T>(factory: (data: Data, context: Context) => MaybeThunk<T>, data: Data) => Directive<T>;