Node: Force nominal typing for zkgroup ByteArray subclasses

Without this, two ByteArray types without any additional operations
are structurally equivalent, and so TypeScript permits passing one as
the other. (Thanks, Fedor!)
This commit is contained in:
Jordan Rose
2022-06-16 16:59:22 -07:00
parent 395e36e9f2
commit 9e6343b6e4
32 changed files with 57 additions and 0 deletions

View File

@@ -7,6 +7,8 @@ import ByteArray from '../internal/ByteArray';
import * as Native from '../../../Native';
export default class ProfileKeyCommitment extends ByteArray {
private readonly __type?: never;
constructor(contents: Buffer) {
super(contents, Native.ProfileKeyCommitment_CheckValidContents);
}