Type Alias OptionallyReadonly<IsReadonly, OriginalType>

OptionallyReadonly: IsReadonly extends true
    ? Readonly<OriginalType>
    : OriginalType

Type Parameters

  • IsReadonly extends boolean
  • OriginalType