How to make a stackable state?

I want to make a state that can be stacking by yanfly's Buff&State Core, so I type this:

Code:
<Custom Apply Effect>

target._stackingAreaOpen = target._stackingAreaOpen || 0;

target._AreaOpen += 1;
</Custom Apply Effect>

<Custom Remove Effect>

target._AreaOpen = 0;
</Custom Remove Effect>

<Custom Regenerate Effect>

target._stackingAreaOpen = target._stackingAreaOpen || 1;

var stacks = Math.min(10, target.stackingAreaOpen);

X //Should gain the target's DEF

target.clearResult();
</Custom Regenerate Effect>

But I don't know what should be type at the "X", please, can somebody tell me?

Original thread: https://forums.rpgmakerweb.com/threads/how-to-make-a-stackable-state.89652/