setField = (tiddler, field, value) => {

  if (!tiddler || !field) {
    return;
  }

  const tRef = getTiddlerRef(tiddler);
  const fields = {
    title: tRef,
    [field]: value
  };

  // do not use any tObj provided, it may result in a lost update!
  let tObj = $tw.wiki.getTiddler(tRef, true);

  if (field !== 'text' && tObj && !tObj.fields.text) {
    fields.text = '';
  }

  tObj = new $tw.Tiddler(tObj, fields);
  $tw.wiki.addTiddler(tObj);

  return tObj;

}
Set a tiddler field to a given value.

Setting the title field to another value will clone the tiddler.
In this case, better use @link{clone} as this is
semantically stronger.

This method is guarded against
https://github.com/Jermolene/TiddlyWiki5/issues/2025

@return {$tw.Tiddler|undefined} The tiddler object containing
    the field with the assigned value.