Closed Extend-Apps closed 3 months ago
@Extend-Apps I think we've looked at this one before. According to the documentation, id is required, right? The way I normally redirect to a new record is just to set id to null. What are your thoughts?
I have a solution in production for a while that works great when id is absent, so we know it works.
I know there are other redirects in his library that work the same way.
I'm easy. I'm like you and want things to line up with the documentation.
Documentation first, but reality should weigh in because we know the NS docs are far from perfect.
Gut feel for me is to set id to null seems clearer reading than just leaving it out (undefined). However, the current type doesn't include null
and since we set strictNullChecks:true
in our projects, that would prevent us from setting it to null
as-is.
At a minimum, can we add | null
to the definition?
@ShawnTalbert That's a good call. @Extend-Apps can you update the PR to keep it required but add null as an allowed value?
id is optional