Function typefusionRef

Get the data from a module (i.e. the result of one of your Typefusion scripts).

  • Type Parameters

    Parameters

    • module: T

      The module to get the data from.

    Returns Promise<"schema" extends keyof T
        ? {
            [K in string | number | symbol]: T["schema"][K] extends {
                    getType: (() => R);
                }
                ? R
                : never
        }[]
        : T extends {
                runEffect: ((...args: any[]) => any);
            }
            ? Success<ReturnType<T<T>["runEffect"]>> extends {
                    data: D;
                }
                ? D
                : never
            : T extends {
                    run: ((...args: any[]) => any);
                }
                ? Awaited<ReturnType<T<T>["run"]>>["data"]
                : never>

    The data from the associated table for that module.