Traqula
    Preparing search index...

    Type Alias IndirDef<Context, NameType, ReturnType, ParamType>

    Definition of an indirection function, analogous to ParserRule for parsers and GeneratorRule for generators.

    An indirection definition has a name and a fun function. The fun function receives helper utilities (currently just SUBRULE) and returns the actual implementation function that receives a context and optional parameters.

    type IndirDef<
        Context = any,
        NameType extends string = string,
        ReturnType = unknown,
        ParamType extends any[] = any[],
    > = {
        fun: (
            def: IndirDefArg,
        ) => (c: Context, ...params: ParamType) => ReturnType;
        name: NameType;
    }

    Type Parameters

    • Context = any

      Context object available in the function implementation.

    • NameType extends string = string

      Name of the function, should be a string literal type (e.g., 'myFunction').

    • ReturnType = unknown

      Type returned by the function.

    • ParamType extends any[] = any[]

      Tuple of additional parameter types beyond the context.

    Index

    Properties

    Properties

    fun: (def: IndirDefArg) => (c: Context, ...params: ParamType) => ReturnType
    name: NameType