Content pfp
Content
@
0 reply
0 recast
0 reaction

typeof.eth đŸ”” pfp
typeof.eth đŸ””
@typeof.eth
TIL that in TypeScript, if you define a class with readonly properties and an empty constructor, TypeScript will automatically assign the properties to the class. Not sure if I love that, tbh, since I was under the impression that TS tends to not modify logic...
4 replies
6 recasts
35 reactions

Darryl Yeo đŸ› ïž pfp
Darryl Yeo đŸ› ïž
@darrylyeo
Same deal for `public name` / `private name` / `protected name`. Pretty sure they did it this way so you don’t have to repeat the same definitions in the class body. Downside of this shorthand is you’re limited to using single ordered arguments in the constructor. https://www.typescriptlang.org/play/?#code/MYGwhgzhAEAqAWBLAdgc2gbwFAEhgHtkIAXAJwFdhj9SAKXHAB1P2IFMq2ATaMALmglSKVABoGjcgCMQiYNCkChI8TibCAbmHbRgSsitwBKTFlwBfLOaA
1 reply
0 recast
2 reactions

behkod pfp
behkod
@behkod.eth
I see no problem in it: https://warpcast.com/behkod.eth/0xdc37f259
0 reply
0 recast
1 reaction