sveltekit-service-manager - v1.1.0
    Preparing search index...

    Interface Service<T, Args, L>

    Service definition used by ServiceManager.Load.

    interface Service<
        T extends string = string,
        Args extends readonly unknown[] = readonly unknown[],
        L = unknown,
    > {
        cleanup?: () => MaybePromise<void>;
        dependsOn?: readonly "ping"[];
        hmr?: ViteImportMeta;
        load?: () => MaybePromise<void>;
        local?: L | ((...args: Args) => L);
        name: T;
        route?:
            | ServiceRouter
            | ServiceHandler<Record<string, string>, string | null>
            | Partial<
                Record<
                    RequestMethods,
                    ServiceHandler<Record<string, string>, string | null>,
                >,
            >;
    }

    Type Parameters

    • T extends string = string
    • Args extends readonly unknown[] = readonly unknown[]
    • L = unknown
    Index

    Properties

    cleanup?: () => MaybePromise<void>
    dependsOn?: readonly "ping"[]
    hmr?: ViteImportMeta

    Allows hot module reload linking

    load?: () => MaybePromise<void>

    Make sure this is side effect free.

    local?: L | ((...args: Args) => L)
    name: T

    Name of the service make also api route service_name

    route?:
        | ServiceRouter
        | ServiceHandler<Record<string, string>, string | null>
        | Partial<
            Record<
                RequestMethods,
                ServiceHandler<Record<string, string>, string | null>,
            >,
        >