In Node.js I have a module which consists of just one function. The function returns promise and the promise could be rejected. Still I don\'t want to force all users of the
I can't figure out any way to do what you're describing.
If you don't care about passing errors to your users, you can add a dummy catch block on the end of your promise chain:
Promise.reject('foo')
.catch(() => {})
This will silence the warning, but won't allow your users to handle the error.
Perhaps you could add an option that your users could decide if they want to handle the error or not.