From 8ff192a1c41df1dc919a097fc9d9ef34a6656903 Mon Sep 17 00:00:00 2001 From: Kundan Kumar Date: Fri, 13 Mar 2026 00:16:37 +0530 Subject: [PATCH] refactor(core): replace explicit any types with safer modern types --- src/github.ts | 4 ++-- src/updaters/generic-yaml.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/github.ts b/src/github.ts index d99e61b16..508deb6e7 100644 --- a/src/github.ts +++ b/src/github.ts @@ -83,7 +83,7 @@ interface GitHubCreateOptions { token?: string; logger?: Logger; proxy?: ProxyOption; - fetch?: any; + fetch?: unknown; } type CommitFilter = (commit: Commit) => boolean; @@ -574,7 +574,7 @@ export class GitHub { } )) { // Paginate plugin doesn't have types for listing files on a commit - const data = resp.data as any as {files: {filename: string}[]}; + const data = resp.data as unknown as {files: {filename: string}[]}; for (const f of data.files || []) { if (f.filename) { files.push(f.filename); diff --git a/src/updaters/generic-yaml.ts b/src/updaters/generic-yaml.ts index 6fe99da9d..d55cc07b4 100644 --- a/src/updaters/generic-yaml.ts +++ b/src/updaters/generic-yaml.ts @@ -58,7 +58,7 @@ export class GenericYaml implements Updater { JSONPath({ resultType: 'all', path: this.jsonpath, - json: data as any, + json: data as object, callback: (payload, _payloadType, _fullPayload) => { if (typeof payload.value !== 'string') { logger.warn(`No string in ${this.jsonpath}. Skipping.`);