@theokit/sdk 3.2.2 → 3.2.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -5,4 +5,17 @@
5
5
  *
6
6
  * @internal
7
7
  */
8
- export {};
8
+ /**
9
+ * Apply an optional `{ offset, limit }` window to an ordered list.
10
+ * `undefined` opts returns the list unchanged; undefined offset ⇒ 0; undefined
11
+ * limit ⇒ to the end. An out-of-range (but valid) offset yields an empty slice.
12
+ *
13
+ * Invalid input FAILS FAST (error-handling.md): `offset`/`limit` must be a
14
+ * non-negative integer — a `NaN`, negative, fractional, or non-finite value is a
15
+ * caller mistake and throws `ConfigurationError` rather than being silently
16
+ * coerced (a `NaN` offset previously returned the whole list).
17
+ */
18
+ export declare function paginate<T>(items: readonly T[], opts?: {
19
+ offset?: number;
20
+ limit?: number;
21
+ }): readonly T[];
@@ -5,4 +5,17 @@
5
5
  *
6
6
  * @internal
7
7
  */
8
- export {};
8
+ /**
9
+ * Apply an optional `{ offset, limit }` window to an ordered list.
10
+ * `undefined` opts returns the list unchanged; undefined offset ⇒ 0; undefined
11
+ * limit ⇒ to the end. An out-of-range (but valid) offset yields an empty slice.
12
+ *
13
+ * Invalid input FAILS FAST (error-handling.md): `offset`/`limit` must be a
14
+ * non-negative integer — a `NaN`, negative, fractional, or non-finite value is a
15
+ * caller mistake and throws `ConfigurationError` rather than being silently
16
+ * coerced (a `NaN` offset previously returned the whole list).
17
+ */
18
+ export declare function paginate<T>(items: readonly T[], opts?: {
19
+ offset?: number;
20
+ limit?: number;
21
+ }): readonly T[];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@theokit/sdk",
3
- "version": "3.2.2",
3
+ "version": "3.2.3",
4
4
  "description": "TypeScript SDK for the Theo agent harness — same surface, local or cloud.",
5
5
  "license": "Apache-2.0",
6
6
  "homepage": "https://github.com/usetheo/theokit-sdk#readme",