Function getContext

  • Gets the current method context.

    Returns the context object from the method context service, which contains information about the current method execution environment.

    Returns Promise<IMethodContext>

    Promise resolving to the current method context object

    Error if method context is not active

    const context = await getContext();
    console.log(context); // { ...method context data... }