Skip to content

Commit e56ec04

Browse files
committed
update
1 parent 632f03e commit e56ec04

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

packages/native/src/event.ts

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)