Skip to content

Commit

Permalink
fix: don't set template Context on BaseContextClass
Browse files Browse the repository at this point in the history
  • Loading branch information
fengmk2 committed Jan 2, 2025
1 parent 8a61a50 commit 20a4644
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/base_context_class.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,16 +5,16 @@ import type { EggCore, Context } from './egg.js';
* it's instantiated in context level,
* {@link Helper}, {@link Service} is extending it.
*/
export class BaseContextClass<T extends Context = Context> {
ctx: T;
export class BaseContextClass {
ctx: Context;
app: EggCore;
config: Record<string, any>;
service: BaseContextClass<T>;
service: BaseContextClass;

/**
* @since 1.0.0
*/
constructor(ctx: T) {
constructor(ctx: Context) {
/**
* @member {Context} BaseContextClass#ctx
* @since 1.0.0
Expand All @@ -34,6 +34,6 @@ export class BaseContextClass<T extends Context = Context> {
* @member {Service} BaseContextClass#service
* @since 1.0.0
*/
this.service = ctx.service as BaseContextClass<T>;
this.service = ctx.service;
}
}

0 comments on commit 20a4644

Please sign in to comment.