Methods should be chainable
manthanhd opened this issue · comments
// proposed new Bot().train(topic, sentence).addSkill(skill).resolve(....) // current var bot = new Bot(); bot.train(topic, sentence); bot.addSkill(skill); bot.resolve(....);
Isn't it just enough to add
return this; in each method? It will return the original Bot object so that all other methods are still defined.