From eb7729e9dbb970e8a463095932a9197040b2ec11 Mon Sep 17 00:00:00 2001 From: "deepsource-autofix[bot]" <62050782+deepsource-autofix[bot]@users.noreply.github.com> Date: Fri, 12 Aug 2022 21:10:37 +0000 Subject: [PATCH] Fix explicit type declarations --- src/authutil.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/authutil.ts b/src/authutil.ts index aaebdfd2..e7457215 100644 --- a/src/authutil.ts +++ b/src/authutil.ts @@ -33,7 +33,7 @@ function writeRegistryToFile( } core.debug(`Setting auth in ${fileLocation}`); - let newContents: string = ''; + let newContents = ''; if (fs.existsSync(fileLocation)) { const curContents: string = fs.readFileSync(fileLocation, 'utf8'); curContents.split(os.EOL).forEach((line: string) => { @@ -49,7 +49,7 @@ function writeRegistryToFile( const registryString: string = scope ? `${scope}:registry=${registryUrl}` : `registry=${registryUrl}`; - const alwaysAuthString: string = `always-auth=${alwaysAuth}`; + const alwaysAuthString = `always-auth=${alwaysAuth}`; newContents += `${authString}${os.EOL}${registryString}${os.EOL}${alwaysAuthString}`; fs.writeFileSync(fileLocation, newContents); core.exportVariable('NPM_CONFIG_USERCONFIG', fileLocation);