Recent posts

typescript keyof typeof

1 minute read

typescript에서 object의 모든 key값을 기준으로 무언가 작업(object 비교)를 할 때, type 때문에 골치아파진다. object의 type은 정해져 있는데, Object.keys() api를 사용하면 key가 string type으로 뽑혀 나온다. string ...

typescript keyof typeof

1 minute read

In typescript, when you want to do something (like comparing objects) based on all of an object’s keys, the type becomes a headache. The object’s type is fix...