maci
maci copied to clipboard
Trying to solve two TS type errors in `crypto/`
- Argument of type 'BigIntConstructor' is not assignable to parameter of type '(value: BigInt, index: number, array: BigInt[]) => bigint'.
- Type 'BigInt' is not assignable to type 'string | number | bigint | boolean'.
I am not sure about the first error fixing:
const level: BigInt[] = pathElements[i].map((i: BigInt): BigInt => {
return BigInt(i as bigint);
})
I am not sure about the first error fixing:
const level: BigInt[] = pathElements[i].map((i: BigInt): BigInt => { return BigInt(i as bigint); })
Thank you so much for opening this, and sorry it took us this long to get back to you. As discussed on discord, we'll be closing this PR the code has been updated since then, and some refactoring work tackling similar issues is about to be merged into the repo, thank you for making this problem evident.