# Function ToMethodWithInjectionContext

- ToMethodWithInjectionContext<
  ReturnType = any,
  Parameter = any,
  MethodType extends
  Method<ReturnType, Parameter> = Method<ReturnType, Parameter>,
  >(
  call: (
  parameters?: Parameter,
  ...args: any[],
  ) => ReturnType | Promise<ReturnType>,
  injector: Injector,
  metadata?: any,
  ): MethodType

  #### Type Parameters

  - ReturnType = any
  - Parameter = any
  - MethodType extends Method<ReturnType, Parameter> = Method<ReturnType, Parameter>

  #### Parameters

  - call: (parameters?: Parameter, ...args: any[]) => ReturnType | Promise<ReturnType>
  - injector: Injector
  - metadata: any = ...

  #### Returns MethodType

  - Defined in packages/angular/forms/src/lib/utilities.ts:10