Why Nostr? What is Njump?
2023-08-18 08:09:52

ruto on Nostr: TypeScriptで`xs: (string | null)[]`のとき、`xs.filter(x => ...

TypeScriptで`xs: (string | null)[]`のとき、`xs.filter(x => x)`が`string[]`になって欲しい。
`function isNotNull<T>(x: T | null): x is T`を定義して`xs.filter(isNotNull)`とすればいけるけど。
Author Public Key
npub19zyfvxjkfcyqml344k8uv5tmjgxjlnft0qcvw0mu870j4whfp65sq5sfxh