@tsed/common 6.69.1 → 6.69.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,7 +21,7 @@ export interface PlatformBootstrap {
21
21
  */
22
22
  export declare abstract class PlatformBuilder<App = TsED.Application, Router = TsED.Router> {
23
23
  #private;
24
- static currentPlatform: Type<PlatformBuilder> & PlatformBootstrap;
24
+ static currentPlatform: Type<PlatformBuilder<any, any>> & PlatformBootstrap;
25
25
  readonly name: string;
26
26
  protected startedAt: Date;
27
27
  protected locals: Container;
@@ -9,9 +9,9 @@ export interface HandlerContextOptions {
9
9
  }
10
10
  export declare class AnyToPromiseWithCtx extends AnyToPromise {
11
11
  $ctx: PlatformContext;
12
- err: any;
12
+ err: unknown;
13
13
  constructor({ $ctx, err }: HandlerContextOptions);
14
- get isDone(): boolean;
14
+ isDone(): boolean;
15
15
  call(cb: Function): Promise<AnyPromiseResult<any>>;
16
16
  destroy(): void;
17
17
  isCanceledResponse(process: any): boolean;
package/lib/index.js CHANGED
@@ -486,12 +486,12 @@ class AnyToPromiseWithCtx extends core.AnyToPromise {
486
486
  this.err = err;
487
487
  }
488
488
 
489
- get isDone() {
489
+ isDone() {
490
490
  const {
491
491
  $ctx
492
492
  } = this;
493
493
 
494
- if (!$ctx.isDone()) {
494
+ if (!($ctx != null && $ctx.isDone())) {
495
495
  if ($ctx != null && $ctx.request.isAborted() || $ctx != null && $ctx.response.isDone()) {
496
496
  this.destroy();
497
497
 
@@ -501,7 +501,7 @@ class AnyToPromiseWithCtx extends core.AnyToPromise {
501
501
  }
502
502
  }
503
503
 
504
- return this.status !== core.AnyToPromiseStatus.PENDING;
504
+ return super.isDone();
505
505
  }
506
506
 
507
507
  async call(cb) {