Type Alias AspectTyping<atom, point, runtime>

AspectTyping<atom, point, runtime>: {
    apply@around: {
        advice: ((state: runtime["State"], callee: runtime["Value"], this_: runtime["Value"], arguments_: runtime["Value"][], ...point: point) => runtime["Value"]);
        pointcut: ExpressionPointcut<atom, point>;
    };
    block@after: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: BlockPointcut<atom, point>;
    };
    block@before: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: BlockPointcut<atom, point>;
    };
    block@declaration: {
        advice: ((state: runtime["State"], frame: Frame<atom["Variable"], runtime["Value"]>, ...point: point) => void);
        pointcut: BlockPointcut<atom, point>;
    };
    block@declaration-overwrite: {
        advice: ((state: runtime["State"], frame: Frame<atom["Variable"], runtime["Value"]>, ...point: point) => Frame<atom["Variable"], runtime["Value"]>);
        pointcut: BlockPointcut<atom, point>;
    };
    block@setup: {
        advice: ((state: runtime["State"], ...point: point) => runtime["State"]);
        pointcut: BlockPointcut<atom, point>;
    };
    block@teardown: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: BlockPointcut<atom, point>;
    };
    block@throwing: {
        advice: ((state: runtime["State"], error: runtime["Value"], ...point: point) => runtime["Value"]);
        pointcut: BlockPointcut<atom, point>;
    };
    construct@around: {
        advice: ((state: runtime["State"], callee: runtime["Value"], arguments_: runtime["Value"][], ...point: point) => runtime["Value"]);
        pointcut: ExpressionPointcut<atom, point>;
    };
    effect@after: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: EffectPointcut<atom, point>;
    };
    effect@before: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: EffectPointcut<atom, point>;
    };
    expression@after: {
        advice: ((state: runtime["State"], result: runtime["Value"], ...point: point) => runtime["Value"]);
        pointcut: ExpressionPointcut<atom, point>;
    };
    expression@before: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: ExpressionPointcut<atom, point>;
    };
    statement@after: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: StatementPointcut<atom, point>;
    };
    statement@before: {
        advice: ((state: runtime["State"], ...point: point) => void);
        pointcut: StatementPointcut<atom, point>;
    };
}

The flexible weaving API expects each advice function to be a global value. It is more complex to use than the standard weaving API but it let the user define the static information provided to the advice functions. Unlike the standard weaving API, each join point can be cut multiple times. NB: the join points apply@around and construct@around can only be cut once. The join points of the flexible weaving API are very similar to the join points of the standard API.

Type Parameters

  • atom extends Atom
  • point extends Json[]
  • runtime extends {
        State: unknown;
        Value: unknown;
    }