Skip to content

Commit

Permalink
🐛 replaced unexpected any with unknown
Browse files Browse the repository at this point in the history
  • Loading branch information
hrueger authored and lukas-runge committed Aug 25, 2023
1 parent ca041f9 commit ec45673
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/lib/helpers.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
export function Try<T>(fn: () => T, err: (e: Error) => any): T {
export function Try<T>(fn: () => T, err: (e: Error) => T): T {
try {
return fn();
} catch (e) {
Expand Down
2 changes: 1 addition & 1 deletion src/test/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ async function main() {
const validateUDRnext = ajv.compile(UDRnextSchema);

const data = await fs.readFile('./src/test/src/myFixture.json', 'utf8').then((res) =>
Try<any>(
Try<unknown>(
() => JSON.parse(res),
(err) => {
console.log(`\nData: ${res}`);
Expand Down

0 comments on commit ec45673

Please sign in to comment.