Defines the next operation and returns it.

import Batch = require("nativescript-batch");

var b = Batch.newBatch(function(ctx) {
    console.log("Operation 1");
}).then(function(ctx) {
    console.log("Operation 2");
}).then(function(ctx) {
    console.log("Operation 3");
});

b.start();