Commit 9c131a2
authored
fix: explicit return types and TS6 source compatibility fixes (#1418)
This PR will tighten some type declarations to prepare this repo's
upgrade to typescript 6.
<!-- CURSOR_SUMMARY -->
---
> [!NOTE]
> **Low Risk**
> Annotation-only and test-mock changes with no security or data-path
logic altered.
>
> **Overview**
> Adds **explicit return types** to `createOptions` in the Fastly,
Shopify Oxygen, Akamai Edgeworker, and server-edge SDKs (`LDOptions` or
`LDOptions & OxygenLDOptions`), so merged options are typed consistently
under stricter TypeScript inference.
>
> For TS 6 / module interop, the **EventProcessor** test mock for
`EventSender` now sets `__esModule: true`. In **sortDataSet**, the
topological-sort loop uses a **non-null assertion** on
`unvisitedItems.values().next().value` when the set is known to be
non-empty.
>
> No intended runtime behavior changes—typing and test compatibility
only.
>
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit
1a0d9dc. Bugbot is set up for automated
code reviews on this repo. Configure
[here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->1 parent 014b59b commit 9c131a2
6 files changed
Lines changed: 6 additions & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
29 | | - | |
| 29 | + | |
30 | 30 | | |
31 | 31 | | |
32 | 32 | | |
| |||
Lines changed: 1 addition & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| |||
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
50 | 50 | | |
51 | 51 | | |
52 | 52 | | |
| 53 | + | |
53 | 54 | | |
54 | 55 | | |
55 | 56 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
8 | 8 | | |
9 | 9 | | |
10 | 10 | | |
11 | | - | |
| 11 | + | |
12 | 12 | | |
13 | 13 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
51 | 51 | | |
52 | 52 | | |
53 | 53 | | |
54 | | - | |
| 54 | + | |
55 | 55 | | |
56 | 56 | | |
57 | 57 | | |
| |||
0 commit comments