Sets the initial result value for all operations.

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

var b = Batch.newBatch(function(ctx) {
    console.log("Result: " + ctx.result);  // 23979
}).then(function(ctx) {
    ctx.result = 5979;
}).setResult(23979);

// 5979
var r = b.start();