Conversation
|
Hello sir, @ioanmo226 - I initially started with converting 5 of these... there is some type of checking in common places like catching an error... if this looks okay maybe I can start converting type any to unknown from there? |
…/github.com/flowcrypt/flowcrypt-browser into issue-4490-convert-type-any-to-type-unknown
This reverts commit 0913777.
… into issue-4490-convert-type-any-to-type-unknown
…type-any-to-type-unknown
|
@martgil please update this PR to make it ready for reviews and merging |
extension/types/squire.d.ts
Outdated
| import * as forge from 'node-forge'; | ||
|
|
||
| export as namespace SquireClass; | ||
|
|
||
| declare global { | ||
| interface Window { | ||
| // @ts-ignore | ||
| Squire: SquireClass; | ||
| forge: typeof forge; | ||
| } | ||
| } | ||
|
|
There was a problem hiding this comment.
Also this is wrong to add forge into squire definitions. Let's remove it and file an issue for Ioan to have a look later.
There was a problem hiding this comment.
okay sir, I'll remove it - I just converted most of it from any to unknown but there are still some that need to have proper types but I can't convert them just yet. I can't figure out what to do with them just yet.
There was a problem hiding this comment.
That's ok. You can leave these for another PR in the future.
tomholub
left a comment
There was a problem hiding this comment.
This is definitely an improvement. @ioanmo226 if there is still any work to do on this issue, you may look into it in a separate PR. Thanks!
| console.error(result.supplementaryOperationsErrors); | ||
| Catch.setHandledTimeout(() => { | ||
| Ui.toast(result.supplementaryOperationsErrors[0]); // tslint:disable-line:no-unsafe-any | ||
| Ui.toast(result.supplementaryOperationsErrors[0] as string); |
There was a problem hiding this comment.
as X is not so safe, it would be safer to test for what type it is and treat it appropriately
This PR's goal is to convert type any to type unknown.
To check the warnings on master branch:
npm run test_eslintclose #4490 // if this PR closes an issue
issue #0000 // if it doesn't close the issue yet
Tests (delete all except exactly one):
To be filled by reviewers
I have reviewed that this PR... (tick whichever items you personally focused on during this review):