jimpex
    Preparing search index...

    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
      • OptionalgetHTMLGenerator?: () => 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