Typos, sentences, structure and flow are supposed to be attended to by the editor(s) the publisher employs (one reason for the publisher's hefty cut, often 40% of cover price, after selling the books at 60% discount to wholesaler; then paying the royalties to the author).
Maybe it's different for nonfiction; but for fiction, the author is absolutely responsible for proper grammar, spelling, and the "flow" of the manuscript, and too many typos and grammatical errors will earn the author an outright rejection. No fiction editor would waste time with an author who hasn't mastered his craft and with a manuscript that isn't ready to be published. It's the writer's job to write, not the editor's. I'm surprised nonfiction editors would bother to take on some of the writing responsibilities.