2 ms·
:facepalm: of course I can, I don't know why it never occurred to me. Probably a case of "if it's ain't broke" but going forward I'll probably switch to this st
by joshstrange 5y ago
:facepalm: of course I can, I don't know why it never occurred to me. Probably a case of "if it's ain't broke" but going forward I'll probably switch to this style.
- conaclos 5y agoFor a long time I avoided to use the same name for a type and a value because I was afraid of possible breaking change in the feature. And then I realized that this is an intended feature of TypeScript: type merging. Here the type `Role` merges with the type of the value `Role :)