//#region src/convert/copyBounded.d.ts /** * Copies at most `cap` entries out of `value` by index. * * Every array method dispatches on the input: a replaced `slice` is called * directly, and the intrinsic `Array.prototype.slice.call` still reaches a * `constructor` with a `@@species` whose `[[Construct]]` returns an arbitrary * object, which then supplies the `map` or `some` the caller runs next. Reading * indices consults neither, so it is the only form that bounds a hostile array. * * Absent indices stay absent, matching what `slice` produces for a sparse * input, so callers that skip holes still skip them. `truncated` comes from the * same `length` read as the bound, so an input cannot report one figure to the * cap and another to the caller's warning. * * A reported `length` is normalized the way `ToLength` does before it reaches * `count`, because a fractional one would otherwise reach `items.length` and * throw `RangeError` where `slice` returns a bounded result. `truncated` reads * that same normalized figure, so a `length` whose `valueOf` answers differently * on a second conversion cannot separate the warning from the bound. */ export declare const copyBounded: (value: readonly T[], cap: number) => { readonly items: T[]; readonly truncated: boolean; }; //#endregion //# sourceMappingURL=copyBounded.d.ts.map