Hacker News new | ask | show | jobs
by JZumun 1692 days ago

  { [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....