I have the following promise code in a existing open source library:
simplified code is following:
class SignIn extends React.Component {
  constructor(props) {
    super(props);
    // What is the underlying type of this.resolver ?
    this.resolver = Promise.resolve();
  }
  handleMFACancel() {
    // Is resolver a function ?
    this.resolver(null);
  }
  handleMFASuccess(session) {
    // Is resolver a function ?
    this.resolver(session);
  }
}
I do not understand how we could use this.resolver as a function.
It is not supposed to be a resolved promise or maybe simply a promise.
 
    