Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assume errors are of type unknown instead of type error #594

Open
TimoGlastra opened this issue Jan 10, 2022 · 3 comments
Open

Assume errors are of type unknown instead of type error #594

TimoGlastra opened this issue Jan 10, 2022 · 3 comments

Comments

@TimoGlastra
Copy link
Contributor

We want to use unknown in catch statements. Before typescript 4.4 any was the default but this is now switched to unknown. Once we have migrated all catch statements to assume error is of type unknown we can upgrade to the new typescript version

We could also use useUnknownInCatchVariables: false in the root tsconfig.build.json for now

TimoGlastra added a commit to TimoGlastra/aries-framework-javascript that referenced this issue Feb 1, 2022
Need to resolve this issue first: openwallet-foundation#594

Signed-off-by: Timo Glastra <timo@animo.id>
@brianorwhatever
Copy link

Looks like you've got this fixed in https://github.com/animo/aries-framework-javascript/tree/build/demo-tsconfig
Any timeline for when that will be in main?

@TimoGlastra
Copy link
Contributor Author

Hi @brianorwhatever,

Sadly this hasn't been addressed yet. That PR locks the version of TS to an older version so we don't get the error, but we still need to update all catch statements to assume the errors are of type unknown.

Do you have a specific need for this change?

@brianorwhatever
Copy link

I was having troubles getting the demos running but I did the same and locked the ts version and it worked after that so I'm not in a hurry anymore. thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants