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
40 lines
1.2 KiB
Plaintext
40 lines
1.2 KiB
Plaintext
import { MonoTypeOperatorFunction } from '../types';
|
|
import { filter } from './filter';
|
|
|
|
/**
|
|
* Returns an Observable that skips the first `count` items emitted by the source Observable.
|
|
*
|
|
* 
|
|
*
|
|
* Skips the values until the sent notifications are equal or less than provided skip count. It raises
|
|
* an error if skip count is equal or more than the actual number of emits and source raises an error.
|
|
*
|
|
* ## Example
|
|
*
|
|
* Skip the values before the emission
|
|
*
|
|
* ```ts
|
|
* import { interval, skip } from 'rxjs';
|
|
*
|
|
* // emit every half second
|
|
* const source = interval(500);
|
|
* // skip the first 10 emitted values
|
|
* const result = source.pipe(skip(10));
|
|
*
|
|
* result.subscribe(value => console.log(value));
|
|
* // output: 10...11...12...13...
|
|
* ```
|
|
*
|
|
* @see {@link last}
|
|
* @see {@link skipWhile}
|
|
* @see {@link skipUntil}
|
|
* @see {@link skipLast}
|
|
*
|
|
* @param count The number of times, items emitted by source Observable should be skipped.
|
|
* @return A function that returns an Observable that skips the first `count`
|
|
* values emitted by the source Observable.
|
|
*/
|
|
export function skip<T>(count: number): MonoTypeOperatorFunction<T> {
|
|
return filter((_, index) => count <= index);
|
|
}
|