Better type for `Registers`
mkermani144 opened this issue · 0 comments
mkermani144 commented
It seems that Registers
type is not narrow enough:
ergo-sdk-js/src/entities/registers.ts
Line 31 in dbdd341
The user may provide any string value as key, which is not correct.
It can be fixed easily with a mapped type:
- export type Registers = {[key: string]: HexString}
+ export type Registers = {[Key in RegisterId]: HexString}