Typed version of writer.