How to properly narrow `unknown` type

后端 未结 0 1400
夕颜
夕颜 2021-01-15 04:40

tl;dr why does

const func = (a: unknown) => {
  if (a && typeof a === \'object\' && \'b\' in a) {
           


        
相关标签:
回答
  • 消灭零回复
提交回复
热议问题