typefusion
    Preparing search index...

    Interface TypefusionScriptEffect<DataElement>

    The type of a Typefusion script export (TypefusionScriptExport) when the result of the runEffect function contains both the 'schema' and return data. This will check that your pgType schema matches the data you are returning, but it's more verbose than using TypefusionDbScript.

    interface TypefusionScriptEffect<DataElement extends Record<string, unknown>> {
        name: string;
        resultDatabase: TypefusionSupportedDatabases;
        run?: () => PromiseLike<TypefusionScriptResult<unknown>>;
        runEffect: <R extends TypefusionContextEffect>() => Effect<
            TypefusionScriptResult<DataElement>,
            any,
            R,
        >;
        schema: { [key in string | number | symbol]: DbType<DataElement[key]> };
    }

    Type Parameters

    • DataElement extends Record<string, unknown>

    Hierarchy (View Summary)

    Index

    Properties

    name: string
    run?: () => PromiseLike<TypefusionScriptResult<unknown>>
    runEffect: <R extends TypefusionContextEffect>() => Effect<
        TypefusionScriptResult<DataElement>,
        any,
        R,
    >
    schema: { [key in string | number | symbol]: DbType<DataElement[key]> }