(/** @type {any[]} */ ...args)
| 246 | const fn = target[method]; |
| 247 | if (typeof fn !== "function") return fn; |
| 248 | const wrapper = async (/** @type {any[]} */ ...args) => { |
| 249 | const response = await fn.apply(target, args); |
| 250 | logRateLimitFromResponse(response, `${namespaceName}.${String(method)}`); |
| 251 | return response; |
| 252 | }; |
| 253 | // Wrap the wrapper in a Proxy so that Octokit-specific property accesses |
| 254 | // (e.g. .endpoint, used by github.paginate()) fall back to the original fn. |
| 255 | // Without this, github.paginate(github.rest.checks.listForRef, ...) throws |
nothing calls this directly
no test coverage detected