Skip to content

Commit

Permalink
Fix ts errors
Browse files Browse the repository at this point in the history
  • Loading branch information
ajlende committed Jul 30, 2024
1 parent 9c871e0 commit a6bc7e6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/commands/ajv.ts
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ export default function (argv: ParsedArgs): AjvCore {

try {
registerer = require("ts-node").register()
} catch (err) {
} catch (err: any) {
/* istanbul ignore next */
if (err.code === "MODULE_NOT_FOUND") {
throw new Error(
Expand Down
4 changes: 2 additions & 2 deletions src/commands/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ export function openFile(filename: string, suffix: string, format?: string): any
} catch (e) {
json = require(file)
}
} catch (err) {
} catch (err: any) {
const msg: string = err.message
console.error(`error: ${msg.replace(" module", " " + suffix)}`)
process.exit(2)
Expand Down Expand Up @@ -79,7 +79,7 @@ export function compile(ajv: Ajv, schemaFile: string): AnyValidateFunction {
const schema = openFile(schemaFile, "schema", "json")
try {
return ajv.compile(schema)
} catch (err) {
} catch (err: any) {
console.error(`schema ${schemaFile} is invalid`)
console.error(`error: ${err.message}`)
process.exit(1)
Expand Down

0 comments on commit a6bc7e6

Please sign in to comment.