interface Config {
    isConfig(
        config: unknown,
        options?: { raiseException?: boolean },
    ): config is
        | Dynamic<
            SvelteComponent<any, any, any>,
            { ContextOmit: never; ContextShape: {}; PropsOmit: never },
        >
        | Standard<
            SvelteComponent<any, any, any>,
            { ContextOmit: never; ContextShape: {}; PropsOmit: never },
        >;
    isConfigEmbed(
        config: unknown,
        options?: { raiseException?: boolean },
    ): config is Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>;
    parseConfig(
        config:
            | Dynamic<
                SvelteComponent<any, any, any>,
                { ContextOmit: never; ContextShape: {}; PropsOmit: never },
            >
            | Standard<
                SvelteComponent<any, any, any>,
                { ContextOmit: never; ContextShape: {}; PropsOmit: never },
            >,
        options?: { thisArg?: unknown },
    ): Parsed;
}
Index

Methods

  • Validates config argument whether it is a valid TJSSvelte.Config.Dynamic or TJSSvelte.Config.Standard configuration object suitable for parsing by TJSSvelte.API.Config.parseConfig.

    Parameters

    • config: unknown

      The potential config object to validate.

    • Optionaloptions: { raiseException?: boolean }

      Options.

      • OptionalraiseException?: boolean

        If validation fails raise an exception.

    Returns config is
        | Dynamic<
            SvelteComponent<any, any, any>,
            { ContextOmit: never; ContextShape: {}; PropsOmit: never },
        >
        | Standard<
            SvelteComponent<any, any, any>,
            { ContextOmit: never; ContextShape: {}; PropsOmit: never },
        >

    Is the config a valid TJSSvelte.Config.Dynamic or TJSSvelte.Config.Standard configuration object.

    Any validation error when raiseException is enabled.

  • Validates config argument whether it is a valid TJSSvelte.Config.Embed configuration object suitable for directly mounting via the <svelte:component> directive.

    Parameters

    • config: unknown

      The potential config object to validate.

    • Optionaloptions: { raiseException?: boolean }

      Options.

      • OptionalraiseException?: boolean

        If validation fails raise an exception.

    Returns config is Embed<SvelteComponent<any, any, any>, { PropsOmit: never }>

    Is the config a valid TJSSvelte.Config.Embed configuration object.

    Any validation error when raiseException is enabled.

  • Parses a TyphonJS Svelte dynamic or standard config object ensuring that the class specified is a Svelte component, loads any dynamic defined context or props preparing the config object for loading into the Svelte component.

    Parameters

    • config:
          | Dynamic<
              SvelteComponent<any, any, any>,
              { ContextOmit: never; ContextShape: {}; PropsOmit: never },
          >
          | Standard<
              SvelteComponent<any, any, any>,
              { ContextOmit: never; ContextShape: {}; PropsOmit: never },
          >

      Svelte config object.

    • Optionaloptions: { thisArg?: unknown }

      Options.

      • OptionalthisArg?: unknown

        This reference to set for invoking any context or props defined as functions for Config.Dynamic configuration objects.

    Returns Parsed

    The processed Svelte config object turned with parsed props & context converted into the format supported by Svelte.