From 5da834993f5fad521026b4994136324d33430740 Mon Sep 17 00:00:00 2001 From: Benjamin Levesque <14175665+benjlevesque@users.noreply.github.com> Date: Fri, 28 Oct 2022 15:04:23 +0200 Subject: [PATCH] Remove "any" --- src/main.ts | 2 +- tsconfig.json | 15 ++++++++------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/src/main.ts b/src/main.ts index ba260c6..b88eb98 100644 --- a/src/main.ts +++ b/src/main.ts @@ -13,7 +13,7 @@ async function run(): Promise { core.setOutput('sha', shortSha) core.exportVariable('SHA', shortSha) - } catch (error: any) { + } catch (error) { core.setFailed(error.message) } } diff --git a/tsconfig.json b/tsconfig.json index f6e7cb5..be9857c 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -1,12 +1,13 @@ { "compilerOptions": { - "target": "es6", /* Specify ECMAScript target version: 'ES3' (default), 'ES5', 'ES2015', 'ES2016', 'ES2017', 'ES2018', 'ES2019' or 'ESNEXT'. */ - "module": "commonjs", /* Specify module code generation: 'none', 'commonjs', 'amd', 'system', 'umd', 'es2015', or 'ESNext'. */ - "outDir": "./lib", /* Redirect output structure to the directory. */ - "rootDir": "./src", /* Specify the root directory of input files. Use to control the output directory structure with --outDir. */ - "strict": true, /* Enable all strict type-checking options. */ - "noImplicitAny": true, /* Raise error on expressions and declarations with an implied 'any' type. */ - "esModuleInterop": true /* Enables emit interoperability between CommonJS and ES Modules via creation of namespace objects for all imports. Implies 'allowSyntheticDefaultImports'. */ + "target": "es6", + "module": "commonjs", + "outDir": "./lib", + "rootDir": "./src", + "strict": true, + "noImplicitAny": true, + "esModuleInterop": true, + "useUnknownInCatchVariables": false }, "exclude": ["node_modules", "**/*.test.ts"] }