You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Even with @types/xml-crypto, I am unable to usefully extend FileKeyInfo. The syntax checks out and TypeScript compiles, but the signature does not honor the methods getKey and getKeyInfo, but proceeds to use the methods as currently defined on FileKeyInfo.
Since TypeScript is strongly typed, I am unable to assign anything to the keyInfoProvider property of the signature object besides instances of KeyInfoProvider and its subclasses.
I have figured out that this happens because both methods are properties of the instance of FileKeyInfo itself, and not its prototype.
The solution is simple, but perhaps you know of a reason not to proceed (for backward's compatibility reasons etc etc). Change:
Please submit the PR for review. The currently active maintainers on this project don't have a clear view of the history of this and related code, even the arguments seem inconsistently used. Your help to clean this up would be most welcome. As long as tests pass, that is a win in my book. If something breaks, then we need more tests.
As I explained to @LoneRifle , I am definitely interested in helping out with this. My ability to really get anything done is going to be limited to Sunday afternoons, but glad you help sort out where we can move this repo.
Even with @types/xml-crypto, I am unable to usefully extend FileKeyInfo. The syntax checks out and TypeScript compiles, but the signature does not honor the methods
getKey
andgetKeyInfo
, but proceeds to use the methods as currently defined on FileKeyInfo.Since TypeScript is strongly typed, I am unable to assign anything to the
keyInfoProvider
property of the signature object besides instances of KeyInfoProvider and its subclasses.I have figured out that this happens because both methods are properties of the instance of FileKeyInfo itself, and not its prototype.
The solution is simple, but perhaps you know of a reason not to proceed (for backward's compatibility reasons etc etc). Change:
To this:
I tested this locally and it passed all your existing unit tests and it also solved my issue. I would be happy to create a PR and submit for review :)
The text was updated successfully, but these errors were encountered: