$ cat "dev63.hatenablog.com/entry/2022/08/23/025227.md"
// ブログエントリー — 2022/8/23

TypeScriptでnullの型ガード

if(valName === null){return undefined}

nullはobjectらしい。
if(typeof valName === 'null'){return undefined}とかだとうまく型ガードできない

[https://blog.hirokuma.work/2021/07/typescriptnullundefined.html:embed:cite]

ENTRY: dev63.hatenablog.com/entry/2022/08/23/025227.md
DATE: 2022/8/23
WORDS: 15