What does the ‘-readonly’ modifier in a mapped type produce?

TypeScript Professional Medium

TypeScript Professional — Medium

What does the ‘-readonly’ modifier in a mapped type produce?

Key points

  • The '-readonly' modifier changes the properties to be mutable.
  • It does not add 'readonly' to all properties.
  • It does not make properties write-only or convert them to private class fields.

Ready to go further?

Related questions