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>;