invokeAction

Defines if global "after" action should be invoked or not.

import Batch = require("nativescript-batch"); var b = Batch.newBatch(function(ctx) { // [0] NOT invoked }).then(function(ctx) { // [1] NOT invoked }).then(function(ctx) { // [2] invoked }).then(function(ctx) { // [3] invoked }); b.before(function(ctx) { ctx.invokeAction = ctx.index >= 2; }); b.start();