typescript convert readonly
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
typescript convert readonly
type DeepWriteable<T> = { -readonly [P in keyof T]: DeepWriteable<T[P]> };
typescript readonly
class Octopus { readonly name: string; readonly numberOfLegs: number = 8;
constructor(theName: string) { this.name = theName; }}
let dad = new Octopus("Man with the 8 strong legs");dad.name = "Man with the 3-piece suit";Cannot assign to 'name' because it is a read-only property.2540Cannot assign to 'name' because it is a read-only property.Try
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us