I know you're entirely right, but sometimes when I see things like this in Typescript...
https://github.com/sindresorhus/type-fest/blob/main/source/r...
I can walk through it with enough pause, but it kinda makes my head implode when I glance at it.
https://github.com/sindresorhus/type-fest/blob/main/source/r...
I can walk through it with enough pause, but it kinda makes my head implode when I glance at it.
{ [Key in KeysType]-?: ... }
TIL that you can disable ? and readonly in mapped types using -. So in the above code, every Key will be mandatory (-?) even if the original one in KeysType was optional.source: https://www.typescriptlang.org/docs/handbook/2/mapped-types....
I guess in a way, the issue is that it is cloaked with familiarity. Your brain gets so used to understanding sentences on first go it’s not used to not understanding it.
However, if it was a chemistry equation and you weren’t familiar with chemistry it would immediately understand that comprehension would take time and thus the mind implosion due to a lack of understanding doesn’t occur.