function createDefaultContext(
  context: PartialContext,
  dependency: TransformResultDependency,
): ResolutionContext {
  return {
    redirectModulePath: (modulePath: string) =>
      redirectModulePath(context, modulePath),
    dependency,
    ...context,
  };
}
Helper used by the `metro` package to create the `ResolutionContext` object.
As context values can be overridden by callers, this occurs externally to
`resolve.js`.