Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
| R.map((rfd) => { | ||
| // @ts-expect-error - We check for committedAt in the previous pipe step | ||
| return url(`/rfd/${rfd.formattedNumber}`, rfd.committedAt) | ||
| }), |
There was a problem hiding this comment.
This is fine, but the other way to do this is rfd.committedAt!. The comment would still be appropriate because I like to have a comment to justify the non-null assertion. Slightly surprised the filter doesn't narrow for you, but I guess it makes sense to keep the original type. The other way you could do it, to avoid the non-null assertion, is flip the direction and do the map first, like rfd => rfd.committedAt ? url(/rfd/${rfd.formattedNumber}, rfd.committedAt) : undefined followed by filter(x => !!x).
There was a problem hiding this comment.
Awesome, did not know about the ! suffix
| </Badge> | ||
| </td> | ||
| <td>{formatTime(job.startedAt)}</td> | ||
| <td>{job.startedAt ? formatTime(job.startedAt) : '--'}</td> |
There was a problem hiding this comment.
Nitpickiest nitpick ever but this should be a real em dash — instead of two dashes.
No description provided.