-
Notifications
You must be signed in to change notification settings - Fork 95
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make and
and or
return type NonNullable
#191
Conversation
@andArg={{or (hash) (array)}} | ||
@orArg={{and (hash) (array)}} | ||
@andArg={{or this.objectOrUndefined this.arrayOrUndefined}} | ||
@orArg={{and this.objectOrUndefined this.arrayOrUndefined}} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@andArg={{or ...}}
@orArg={{and ...}}
I don't quite understand the test but, are these the wrong way around?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah, this test case needs updates to better reflect use real world scenarios.
Will do the same prob after #196
return new Date().getMonth() === 7 ? { foo: 'bar' } : undefined; | ||
} | ||
|
||
get arrayOrUndefined(): object | undefined { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this isn't an array 😅
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeap! it is. I had a huge doubts about this approach in the first place and more I think about it, the more I get confident this is totally wrong.
I think #196 if the way to go (just need to make CI happy)
No description provided.