fix(core): update
This commit is contained in:
		@@ -28,7 +28,7 @@ export class TypedHandler<T extends plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
      );
 | 
			
		||||
    }
 | 
			
		||||
    let typedResponseError: TypedResponseError;
 | 
			
		||||
    const response = await this.handlerFunction(typedRequestArg.request).catch(e => {
 | 
			
		||||
    const response = await this.handlerFunction(typedRequestArg.request).catch((e) => {
 | 
			
		||||
      if (e instanceof TypedResponseError) {
 | 
			
		||||
        typedResponseError = e;
 | 
			
		||||
      } else {
 | 
			
		||||
@@ -39,7 +39,7 @@ export class TypedHandler<T extends plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
    if (typedResponseError) {
 | 
			
		||||
      typedRequestArg.error = {
 | 
			
		||||
        text: typedResponseError.errorText,
 | 
			
		||||
        data: typedResponseError.errorData
 | 
			
		||||
        data: typedResponseError.errorData,
 | 
			
		||||
      };
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
@@ -47,7 +47,7 @@ export class TypedHandler<T extends plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
      typedRequestArg.response = response;
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    typedRequestArg?.correlation?.phase ? typedRequestArg.correlation.phase = 'response' : null;
 | 
			
		||||
    typedRequestArg?.correlation?.phase ? (typedRequestArg.correlation.phase = 'response') : null;
 | 
			
		||||
 | 
			
		||||
    return typedRequestArg;
 | 
			
		||||
  }
 | 
			
		||||
 
 | 
			
		||||
@@ -29,15 +29,12 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
  public method: string;
 | 
			
		||||
 | 
			
		||||
  // STATIC
 | 
			
		||||
  constructor(
 | 
			
		||||
    postEndPointArg: string | IPostMethod,
 | 
			
		||||
    methodArg: T['method']
 | 
			
		||||
  )
 | 
			
		||||
  constructor(postEndPointArg: string | IPostMethod, methodArg: T['method']);
 | 
			
		||||
  constructor(
 | 
			
		||||
    postEndPointArg: string | IPostMethodWithTypedRouter,
 | 
			
		||||
    methodArg: T['method'],
 | 
			
		||||
    typedrouterRefArg?: TypedRouter)
 | 
			
		||||
  {
 | 
			
		||||
    typedrouterRefArg?: TypedRouter
 | 
			
		||||
  ) {
 | 
			
		||||
    if (typeof postEndPointArg === 'string') {
 | 
			
		||||
      this.urlEndPoint = postEndPointArg;
 | 
			
		||||
    } else {
 | 
			
		||||
@@ -67,8 +64,8 @@ export class TypedRequest<T extends plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
      responseBody = response;
 | 
			
		||||
    } else {
 | 
			
		||||
      let responseInterest: plugins.lik.Interest<
 | 
			
		||||
          string,
 | 
			
		||||
          plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
        string,
 | 
			
		||||
        plugins.typedRequestInterfaces.ITypedRequest
 | 
			
		||||
      >;
 | 
			
		||||
      // having a typedrouter allows us to work with async request response cycles.
 | 
			
		||||
      if (this.typedRouterRef) {
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user