Generalized the type of `readOnly`