File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed
Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -1092,4 +1092,26 @@ export class FastEvent<
10921092 scope . bind ( this as any , prefix , options ) ;
10931093 return scope ;
10941094 }
1095+ // /**
1096+ // * 用于将满足条件的消息桥接到其他FastEvent
1097+ // *
1098+ // * const emitter = new FastEvent();
1099+ // * const otherEmitter = new FastEvent();
1100+ // *
1101+ // * - 将data/消息桥接到其他发射器
1102+ // * const otherEmitter2 = emitter.bridgeTo(otherEmitter, (message) => {
1103+ // * return message.type.startsWith('data/');
1104+ // * });
1105+ // * - 将data/消息桥接到其他发射器,并且更改消息类型
1106+ // * const otherEmitter2 = emitter.bridgeTo(otherEmitter, (message) => {
1107+ // * return message.type === 'data/process';
1108+ // * },(message) => {
1109+ // * message.type = message.type.replace('data/','message/')
1110+ // * return message
1111+ // * };
1112+ // *
1113+ // *
1114+ // *
1115+ // */
1116+ // bridgeTo(emitter: FastEvent) {}
10951117}
You can’t perform that action at this time.
0 commit comments