minus-square𝕱𝖎𝖗𝖊𝖜𝖎𝖙𝖈𝖍@lemmy.worldtoProgrammer Humor@lemmy.ml•Why make it complicated?linkfedilinkarrow-up3·edit-211 天前You can also do that in TypeScript readonly a!: Foo; readonly b = bar.toFoo(); constructor(){ a = bar.toFoo(); } linkfedilink
You can also do that in TypeScript
readonly a!: Foo; readonly b = bar.toFoo(); constructor(){ a = bar.toFoo(); }