Implement resolve
976067
public Selector resolve(Identifier id, PositionAssigner positionAssigner) {
    positionAssigner.assign(id);
    return id;
  }
269647
function(value) {
		if (this.resolved) {
			throw new Error('Future resolved more than once');
		}
		this.value = value;
		this.resolved = true;

		var callbacks = this.callbacks;
		if (callbacks) {
			delete this.callbacks;
			for (var ii = 0; ii < callbacks.length; ++ii) {
				try {
					var ref = callbacks[ii];
					if (ref[1]) {
						ref[1](value);
					} else {
						ref[0](undefined, value);
					}
				} catch(ex) {
					// console.log('Resolve cb threw', String(ex.stack || ex.message || ex));
					process.nextTick(function() {
						throw(ex);
					});
				}
			}
		}
	}
1418
function resolveFile (dir, file) {
  return new Promise((resolve, reject) => {
    resolver.resolve({}, dir, file, (err, result) => {
      if (err) reject(err)
      else resolve(result)
    })
  })
}
739788
function resolveObject(arg) {
  var resolvedObject = {};
  return Object.keys(arg)
      .reduce(function(soFar, key) {
        return soFar
            .then(resolveItem.bind(null, arg[key]))
            .then(function(value) {
              resolvedObject[key] = value;
            });
      }, Promise.resolve())
      .then(function() {
        return resolvedObject;
      });
}
1044335
function (resolve, reject, callback) {
  callback = preConditions.getCallback(callback);

  return requestManager.generateAccessToken().then(function () {
    return requestManager.exec(execOptions);
  }).then(function (response) {
    resolve(response);
    return callback.apply(null, [null, response]);
  }).catch(function (err) {
    reject(err);
    return callback.apply(null, [err, null]);
  });
}
428141
function(resolve) {
    var resolvesPromises = {};

    angular.forEach(resolve, function(value, key) {
      var resolution = angular.isString(value) ? $injector.get(value) : $injector.invoke(value, null, null, key);
      resolvesPromises[key] = $q.when(resolution);
    });

    return $q.all(resolvesPromises);
  }
613562
function resolve (manager, resolveReducer, accumulator, reducer) {
  const entity = manager.entities.get(reducer.id)
  return BaseEntity.resolve(
    manager,
    resolveReducer,
    accumulator,
    reducer,
    entity
  )
}
399627
public final void resolve(String value) {
		future.complete(new Tree((Tree) null, null, value));
	}
469273
function resolve(promise) {
    var method = promise.state === FULFILLED ? 'onFulfilled' : 'onRejected';
    var arg = method === 'onFulfilled' ? promise.value : promise.reason;
    var handler, value;

    nextTick(function() {
      var isPromise;

      while (promise.handlers[0]) {
        handler = promise.handlers.shift();

        try {
          value = handler[method](arg);

          // Handle "thenables" as well as Promises
          isPromise = value instanceof Promise || value && isFunc(value.then);

          if (isPromise) {
            value.then(function(value) { fulfill(handler.promise, value); },
                       function(reason) { reject(handler.promise, reason); });
          } else {
            fulfill(handler.promise, value);
          }
        } catch(err) {
          reject(handler.promise, err);
        }
      }
    });

    return promise;
  }
570740
function resolve(path, options, callback) {
        resolvePath(path, options, function (err, path) {
            if (err) return callback(err);
            callback(null, { path: path });
        });
    }
870316
function resolve() {
    var promises = [];
    var args = flatten(arguments);
    for (var i = 0; i < args.length; i ++) {
      promises.push(Esquire.resolve(args[i], true, true));
    }

    /* Await for resolution of dependencies */
    return Promise.all(promises).then(function(result) {
      var modules = {};
      for (var i = 0; i < result.length; i ++) {
        var resolved = result[i];
        for (var name in resolved) {
          var module = resolved[name];
          if (module.$$dynamic) continue;
          modules[name] = resolved[name];
        }
      }
      return modules;
    });
  }
1319606
function resolve() {
      var deferred = this,
          clone = deferred.benchmark,
          bench = clone._original;

      if (bench.aborted) {
        // cycle() -> clone cycle/complete event -> compute()'s invoked bench.run() cycle/complete.
        deferred.teardown();
        clone.running = false;
        cycle(deferred);
      }
      else if (++deferred.cycles < clone.count) {
        clone.compiled.call(deferred, context, timer);
      }
      else {
        timer.stop(deferred);
        deferred.teardown();
        delay(clone, function() { cycle(deferred); });
      }
    }
295747
@Override
    public String resolve(MessageResolver messageResolver) {
        MessageResolver.assertThatIsNotNull(messageResolver);

        return messageResolver.resolve(this.code, this.arguments);
    }
1231977
async function resolve (ant, resolveArgs, fieldArgs, currentValue, model) {
  let field = null;
  if (model) {
    field = model.field;
  }
  if (ant && resolveArgs && resolveArgs.to) {
    const antFunction =  ant.functionController.getFunction(resolveArgs.to);
    if (!antFunction) {
      logger.error(new AntError(
        `Could not find "${resolveArgs.to}" function`
      ));
      return null;
    }
    try {
      currentValue = antFunction.run(
        currentValue !== undefined ? currentValue : fieldArgs
      );
      if (currentValue instanceof Observable) {
        if (
          field &&
          field.astNode &&
          field.astNode.type &&
          field.astNode.type.kind === 'ListType'
        ) {
          return await currentValue.pipe(
            flatMap(data => data instanceof Array ? data : [ data ]),
            toArray()
          ).toPromise();
        } else {
          return await currentValue.toPromise();
        }
      } else {
        return currentValue;
      }
    } catch (e) {
      logger.error(new AntError(
        `Could not run "${resolveArgs.to}" function`,
        e
      ));
    }
  }
  return null;
}
1320715
public void resolve() {
        E.illegalStateIf(state != State.CREATED);
        localeResolver.resolve();
        boolean sessionFree = handler.sessionFree() || sessionPassThrough;
        setWasUnauthenticated();
        H.Request req = req();
        if (!sessionFree) {
            resolveSession(req);
            app().eventBus().emit(new PreFireSessionResolvedEvent(session, this));
            resolveFlash(req);
        }
        state = State.SESSION_RESOLVED;
        if (!sessionFree) {
            handler.prepareAuthentication(this);
            app().eventBus().emit(new SessionResolvedEvent(session, this));
            if (isLoggedIn()) {
                clearWasUnauthenticated();
            }
        }
    }
64826
function resolve(deps, rem) {
    var i, length, dep, mod, result = [];

    for (i = 0, length = deps.length; i < length; i++) {
      dep = deps[i];
      mod = cache[dep] || rem[dep];

      if (!mod) {
        throw new TypeError("Module " + dep + " has not yet been loaded");
      }

      if (cache[dep]) {
        if (!mod.hasOwnProperty("code")) {
          mod.code = load(mod);
        }
        result[i] = mod.code;
      }
      else {
        result[i] = mod;
      }
    }

    return result;
  }
605778
function Context(resolve, reject, custom) {
    this.resolve = resolve;
    this.reject = reject;
    this.custom = custom;
  }