type TextWrapperStorage = { wrapText: (text: string) => string };
const trimStep = mutatingStep<TextWrapperStorage>(
({ text, storage: { wrapText } }) => wrapText(text.trim())
);
// is equivalent to
const trimStep: TaraskStep<TextWrapperStorage> = (ctx) => {
ctx.text = options.storage.wrapText(
ctx.text.trim()
);
};
Utility function for a step that always modifies the text