Is it possible to make a higher order function over a typeguard?

前端 未结 0 1623
不思量自难忘°
不思量自难忘° 2021-01-27 00:52

I have the following fairly basic function:

function isNil(x: T | undefined | null): x is undefined | null {
  return x === undefined || x === null;
}


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