Could you add jsdoc for what the return promise resolves to (and for undo below)