Sets the initial result and execution values.

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

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

b.batch.setResultAndValue(23979);

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