Type alias FastHTMLConstructorOptions

FastHTMLConstructorOptions: Partial<FastHTMLOptions> & {
    inject: {
        events: Events;
        getHTMLGenerator?: (() => HTMLGenerator | undefined);
        sendFile: SendFile;
    };
}

The options to construct a FastHTML.

Type declaration

  • inject: {
        events: Events;
        getHTMLGenerator?: (() => HTMLGenerator | undefined);
        sendFile: SendFile;
    }

    A dictionary with the dependencies to inject.

    • events: Events
    • Optional getHTMLGenerator?: (() => HTMLGenerator | undefined)

      A function to get a possible HTMLGenerator. This is injected as a "getter" to not interrupt the DIC "lifecycle": middlewares are initialized right when the app starts, and injecting a reference would force the service to be initialized too, even if a request is not being made.

    • sendFile: SendFile

Generated using TypeDoc