diff --git a/spec.bs b/spec.bs index 216fc1a..51ead03 100644 --- a/spec.bs +++ b/spec.bs @@ -374,7 +374,6 @@ interface Observable { Promise forEach(Visitor callback, optional SubscribeOptions options = {}); Promise every(Predicate predicate, optional SubscribeOptions options = {}); // Maybe? Promise first(optional SubscribeOptions options = {}); - Promise last(optional SubscribeOptions options = {}); Promise find(Predicate predicate, optional SubscribeOptions options = {}); Promise some(Predicate predicate, optional SubscribeOptions options = {}); Promise reduce(Reducer reducer, optional any initialValue, optional SubscribeOptions options = {}); @@ -1290,51 +1289,6 @@ For now, see [https://github.com/wicg/observable#operators](https://github.com/w 1. Return |p|. -
- The last(|options|) method steps are: - - 1. Let |p| [=a new promise=]. - - 1. If |options|'s {{SubscribeOptions/signal}} is not null: - - 1. If |options|'s {{SubscribeOptions/signal}} is [=AbortSignal/aborted=], then: - - 1. [=Reject=] |p| with |options|'s {{SubscribeOptions/signal}}'s [=AbortSignal/abort - reason=]. - - 1. Return |p|. - - 1. [=AbortSignal/add|Add the following abort algorithm=] to |options|'s - {{SubscribeOptions/signal}}: - - 1. [=Reject=] |p| with |options|'s {{SubscribeOptions/signal}}'s [=AbortSignal/abort - reason=]. - - 1. Let |lastValue| be an {{any}}-or-null, initially null. - - 1. Let |hasLastValue| be a [=boolean=], initially false. - - 1. Let |observer| be a new [=internal observer=], initialized as follows: - - : [=internal observer/next steps=] - :: 1. Set |hasLastValue| to true. - - 1. Set |lastValue| to the passed in value. - - : [=internal observer/error steps=] - :: [=Reject=] |p| with the passed in error. - - : [=internal observer/complete steps=] - :: 1. If |hasLastValue| is true, [=resolve=] |p| with |lastValue|. - - 1. Otherwise, [=reject=] |p| with a [=new=] {{RangeError}}. - - 1. Subscribe to [=this=] given |observer| - and |options|. - - 1. Return |p|. -
-
The find(|predicate|, |options|) method steps are: