Documentation
    Preparing search index...

    When a Mustache template is rendered data needs to be provided to replace tags in the template; a ContextProvider delivers that information. The ContextProvider includes context for the input template, as well as the method getContextValue which searches in the parent context for values that are not provided in context (see: Variables)

    interface ContextProvider {
        context: ContextTypes;
        getContextValue?: <CTX extends ContextTypes>(
            tag: Tag,
        ) => Promise<CTX | undefined>;
    }
    Index

    Properties

    context: ContextTypes

    Context for the current template.

    getContextValue?: <CTX extends ContextTypes>(
        tag: Tag,
    ) => Promise<CTX | undefined>

    If a value is not found in the current context this method is invoked to look for the value in parent context.