Skip to content

Commit abd795b

Browse files
authored
Revert "Spec the last() operator (#133)" (#143)
This reverts commit e6ee22b.
1 parent e6ee22b commit abd795b

File tree

1 file changed

+0
-46
lines changed

1 file changed

+0
-46
lines changed

spec.bs

-46
Original file line numberDiff line numberDiff line change
@@ -374,7 +374,6 @@ interface Observable {
374374
Promise<undefined> forEach(Visitor callback, optional SubscribeOptions options = {});
375375
Promise<boolean> every(Predicate predicate, optional SubscribeOptions options = {});
376376
// Maybe? Promise<any> first(optional SubscribeOptions options = {});
377-
Promise<any> last(optional SubscribeOptions options = {});
378377
Promise<any> find(Predicate predicate, optional SubscribeOptions options = {});
379378
Promise<boolean> some(Predicate predicate, optional SubscribeOptions options = {});
380379
Promise<any> 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
12901289
1. Return |p|.
12911290
</div>
12921291

1293-
<div algorithm>
1294-
The <dfn for=Observable method><code>last(|options|)</code></dfn> method steps are:
1295-
1296-
1. Let |p| [=a new promise=].
1297-
1298-
1. If |options|'s {{SubscribeOptions/signal}} is not null:
1299-
1300-
1. If |options|'s {{SubscribeOptions/signal}} is [=AbortSignal/aborted=], then:
1301-
1302-
1. [=Reject=] |p| with |options|'s {{SubscribeOptions/signal}}'s [=AbortSignal/abort
1303-
reason=].
1304-
1305-
1. Return |p|.
1306-
1307-
1. [=AbortSignal/add|Add the following abort algorithm=] to |options|'s
1308-
{{SubscribeOptions/signal}}:
1309-
1310-
1. [=Reject=] |p| with |options|'s {{SubscribeOptions/signal}}'s [=AbortSignal/abort
1311-
reason=].
1312-
1313-
1. Let |lastValue| be an {{any}}-or-null, initially null.
1314-
1315-
1. Let |hasLastValue| be a [=boolean=], initially false.
1316-
1317-
1. Let |observer| be a new [=internal observer=], initialized as follows:
1318-
1319-
: [=internal observer/next steps=]
1320-
:: 1. Set |hasLastValue| to true.
1321-
1322-
1. Set |lastValue| to the passed in <var ignore>value</var>.
1323-
1324-
: [=internal observer/error steps=]
1325-
:: [=Reject=] |p| with the passed in <var ignore>error</var>.
1326-
1327-
: [=internal observer/complete steps=]
1328-
:: 1. If |hasLastValue| is true, [=resolve=] |p| with |lastValue|.
1329-
1330-
1. Otherwise, [=reject=] |p| with a [=new=] {{RangeError}}.
1331-
1332-
1. <a for=Observable lt="subscribe to an Observable">Subscribe</a> to [=this=] given |observer|
1333-
and |options|.
1334-
1335-
1. Return |p|.
1336-
</div>
1337-
13381292
<div algorithm>
13391293
The <dfn for=Observable method><code>find(|predicate|, |options|)</code></dfn> method steps are:
13401294

0 commit comments

Comments
 (0)