I have a .d.ts
file similar to this:
declare function myfunc(): {
something: (err, { req, res, errorInfo, query, pathname, extra }?) => void;
};
This declaration states that the function takes two arguments, with the second argument being an optional "options" object.
However, I am looking for a way to also make the keys of the options object optional, allowing me to pass a partial object as the second argument.
Can someone provide guidance on the correct syntax for achieving this?