Skip to content

Commit

Permalink
Support Observer callback union for subscription (#89)
Browse files Browse the repository at this point in the history
  • Loading branch information
domfarolino authored Nov 29, 2023
1 parent e153f01 commit cfffd49
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion spec.bs
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,8 @@ dictionary Observer {
VoidFunction complete;
};

typedef (ObserverCallback or Observer) ObserverUnion;

dictionary SubscribeOptions {
AbortSignal signal;
};
Expand All @@ -185,7 +187,7 @@ callback Visitor = undefined (any element, unsigned long long index);
[Exposed=*]
interface Observable {
constructor(SubscribeCallback callback);
undefined subscribe(optional Observer observer = {}, optional SubscribeOptions options = {});
undefined subscribe(optional ObserverUnion observer = {}, optional SubscribeOptions options = {});

undefined finally(VoidFunction callback);

Expand Down

0 comments on commit cfffd49

Please sign in to comment.