@@ -1076,21 +1076,19 @@ export class FastEvent<
10761076 options ?: DeepPartial < FastEventScopeOptions < Meta & M , C > > ,
10771077 ) : FastEventScope < ScopeEvents < AllEvents , P > & E , Meta & M , C > ;
10781078
1079- // 处理 FastEventScope 子类(优先级高,放在前面)
1080- scope <
1081- E extends Record < string , any > = Record < string , any > ,
1082- P extends string = string ,
1083- M extends Record < string , any > = Record < string , any > ,
1084- C = Context ,
1085- ScopeObject extends FastEventScope < any , any , any > = FastEventScope < any , any , any > ,
1086- > ( prefix : P , scopeObj : ScopeObject , options ?: DeepPartial < FastEventScopeOptions < Meta & M , C > > ) : ScopeObject & FastEventScope < ScopeEvents < AllEvents , P > & E , Meta & M , C > ;
1079+ // 处理 FastEventScope 子类,自动合并实例的事件类型
1080+ scope < P extends string = string , ScopeObject extends FastEventScope < any , any , any > = FastEventScope < any , any , any > > (
1081+ prefix : P ,
1082+ scopeObj : ScopeObject ,
1083+ options ?: DeepPartial < FastEventScopeOptions < Meta > > ,
1084+ ) : FastEventScopeExtend < AllEvents , P , ScopeObject > ;
10871085
1088- // 处理通用的 Class 实例(排除 FastEventScope)
1086+ // 处理通用的 Class 实例(非 FastEventScope)
10891087 scope < E extends Record < string , any > = Record < string , any > , P extends string = string , C = Context , ScopeObject extends InstanceType < Class > = InstanceType < Class > > (
10901088 prefix : P ,
10911089 scopeObj : ScopeObject ,
10921090 options ?: DeepPartial < FastEventScopeOptions < Meta > > ,
1093- ) : FastEventScopeExtend < AllEvents , P , ScopeObject > ;
1091+ ) : FastEventScope < ScopeEvents < AllEvents , P > > & ScopeObject ;
10941092 scope ( ) {
10951093 const [ prefix , scopeObj , options ] = parseScopeArgs ( arguments , this . options . meta , this . options . context ) ;
10961094 let scope ;
0 commit comments