Open johankasperi opened 1 month ago
Hello, UserAuthWithEncryptionParams
and UserAuthWithHashParams
both extend UserAuthParams
. The function should accept digest
without issue. Is it not the case?
Hello,
UserAuthWithEncryptionParams
andUserAuthWithHashParams
both extendUserAuthParams
. The function should acceptdigest
without issue. Is it not the case?
No that is not the case. That is not how TypeScript functions. Just because UserAuthWithEncryptionParams
and UserAuthWithHashParams
extends UserAuthParams
doesn't mean that the function accepts these types.
Hello,
UserAuthWithEncryptionParams
andUserAuthWithHashParams
both extendUserAuthParams
. The function should acceptdigest
without issue. Is it not the case?No that is not the case. That is not how TypeScript functions. Just because
UserAuthWithEncryptionParams
andUserAuthWithHashParams
extendsUserAuthParams
doesn't mean that the function accepts these types.
If I find the time I can make a PR that fixes this
No pb, if this fixes the issue:
userAuthParams: UserAuthParams | UserAuthWithEncryptionParams | UserAuthWithHashParams
we can add it to the next release.
No pb, if this fixes the issue:
userAuthParams: UserAuthParams | UserAuthWithEncryptionParams | UserAuthWithHashParams
we can add it to the next release.
Yes that will fix the issue
https://github.com/didomi/react-native/blob/90b94df9cdcce5df685fcb71203ba3c85e403268/src/Didomi.ts#L616
Shouldn't it be:
so the function accepts for example
digest
in the params?