Any writing experience will help some, but you'll need to sell its relevance in your proposal.
I had never written a full-length book when I got my first book contract. I did have extensive experience in writing short works in the field, editing (both engineering papers and books in the content-area of my contract). I also had experience as a editorial assistant, managing and editing the submissions of a multi-author textbook and preparing the book for publication. My publisher wanted to see writing samples that consisted of the short works I'd written, rather than requiring a chapter of the proposed book.
I think that my experience writing short works in my subject area and editing and preparing large works of any type convinced them that I could write reasonably well and that I could finish a book-length work.