Some checks failed
Main Confidence / confidence (push) Failing after 45s
## Summary - introduce surface-aware compressed governance outcomes and reuse the shared truth/explanation seams for operator-first summaries - apply the compressed outcome hierarchy across baseline, evidence, review, review-pack, canonical review/evidence, and artifact-oriented operation-run surfaces - expand spec 214 fixtures and Pest coverage, and fix tenant-panel route assertions by generating explicit tenant-panel URLs in the affected Filament tests ## Validation - `cd apps/platform && ./vendor/bin/sail bin pint --dirty --format agent` - focused governance compression suite from `specs/214-governance-outcome-compression/quickstart.md` passed (`68` tests, `445` assertions) - `cd apps/platform && ./vendor/bin/sail artisan test --compact tests/Feature/Filament/InventoryItemResourceTest.php tests/Feature/Filament/BackupSetUiEnforcementTest.php tests/Feature/Filament/RestoreRunUiEnforcementTest.php` passed (`18` tests, `81` assertions) Co-authored-by: Ahmed Darrazi <ahmed.darrazi@live.de> Reviewed-on: #253
51 lines
1.8 KiB
Plaintext
51 lines
1.8 KiB
Plaintext
import { OperatorFunction } from '../types';
|
|
/**
|
|
* Emits the single value at the specified `index` in a sequence of emissions
|
|
* from the source Observable.
|
|
*
|
|
* <span class="informal">Emits only the i-th value, then completes.</span>
|
|
*
|
|
* 
|
|
*
|
|
* `elementAt` returns an Observable that emits the item at the specified
|
|
* `index` in the source Observable, or a default value if that `index` is out
|
|
* of range and the `default` argument is provided. If the `default` argument is
|
|
* not given and the `index` is out of range, the output Observable will emit an
|
|
* `ArgumentOutOfRangeError` error.
|
|
*
|
|
* ## Example
|
|
*
|
|
* Emit only the third click event
|
|
*
|
|
* ```ts
|
|
* import { fromEvent, elementAt } from 'rxjs';
|
|
*
|
|
* const clicks = fromEvent(document, 'click');
|
|
* const result = clicks.pipe(elementAt(2));
|
|
* result.subscribe(x => console.log(x));
|
|
*
|
|
* // Results in:
|
|
* // click 1 = nothing
|
|
* // click 2 = nothing
|
|
* // click 3 = MouseEvent object logged to console
|
|
* ```
|
|
*
|
|
* @see {@link first}
|
|
* @see {@link last}
|
|
* @see {@link skip}
|
|
* @see {@link single}
|
|
* @see {@link take}
|
|
*
|
|
* @throws {ArgumentOutOfRangeError} When using `elementAt(i)`, it delivers an
|
|
* `ArgumentOutOfRangeError` to the Observer's `error` callback if `i < 0` or the
|
|
* Observable has completed before emitting the i-th `next` notification.
|
|
*
|
|
* @param index Is the number `i` for the i-th source emission that has happened
|
|
* since the subscription, starting from the number `0`.
|
|
* @param defaultValue The default value returned for missing indices.
|
|
* @return A function that returns an Observable that emits a single item, if
|
|
* it is found. Otherwise, it will emit the default value if given. If not, it
|
|
* emits an error.
|
|
*/
|
|
export declare function elementAt<T, D = T>(index: number, defaultValue?: D): OperatorFunction<T, T | D>;
|
|
//# sourceMappingURL=elementAt.d.ts.map |