Commit 1a882a5
committed
refactor(memoization): drop unused Result type parameter from MemoizeOptions
`MemoizeOptions<Args, _Result>` had a second type parameter that
was declared but never referenced in the type body — the
underscore prefix advertised "intentionally unused", but the
parameter had no purpose and misled readers into thinking the
options were result-type-aware.
Callers (`Memoize` decorator, `memoize`, `memoizeAsync`) all passed
their own `Result` generic through, which was silently discarded.
Drop the parameter and update the three call sites.
No runtime change; no API change for consumers who wrote
`MemoizeOptions<[string]>` (the default `= unknown` covered them);
consumers who explicitly wrote `MemoizeOptions<Args, Result>` need
to drop the second argument. The type was public but the second
parameter was never load-bearing for anyone.1 parent fcea2c0 commit 1a882a5
1 file changed
Lines changed: 4 additions & 4 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
99 | 99 | | |
100 | 100 | | |
101 | 101 | | |
102 | | - | |
| 102 | + | |
103 | 103 | | |
104 | 104 | | |
105 | 105 | | |
| |||
137 | 137 | | |
138 | 138 | | |
139 | 139 | | |
140 | | - | |
| 140 | + | |
141 | 141 | | |
142 | 142 | | |
143 | 143 | | |
| |||
244 | 244 | | |
245 | 245 | | |
246 | 246 | | |
247 | | - | |
| 247 | + | |
248 | 248 | | |
249 | 249 | | |
250 | 250 | | |
| |||
0 commit comments