update type signature for ws writer