| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
|
Can you add a test? |
Sorry, something went wrong.
Sorry, something went wrong.
Hi, I have added related test |
Sorry, something went wrong.
| if (isPromise(shouldCopy)) { | ||
| if (typeof shouldCopy !== 'boolean') { |
There was a problem hiding this comment.
I have the feeling this was done on purpose, to support truthy values, and there's a Promise check to prevent mistakes.
Sorry, something went wrong.
There was a problem hiding this comment.
Sorry, something went wrong.
There was a problem hiding this comment.
Thanks for your feedback. and I have a question, for
opt.filter = (value) => {
//
}its return type contradicts the documentation, which states Returns: <boolean>, but it wont throw an error. Should here use a more precise description, such as the type that is coercible to boolean type?
Sorry, something went wrong.
Sorry, something went wrong.
There was a problem hiding this comment.
I'm fine with either (changing the code or the docs); if we change the code, let's land this as semver-major.
Sorry, something went wrong.
There was a problem hiding this comment.
I think I might prefer changing the docs to changing the code here.
Sorry, something went wrong.
PR-URL: nodejs#52742 Refs: nodejs#52461 Reviewed-By: Vinícius Lourenço Claro Cardoso <contact@viniciusl.com.br> Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
| Back | FazBrowse Home | New Git URL |
Ensure return type of options.filter in cpsync matches doc.
according to the documentation, the return value of options.filter has boolean type.