mirror of
https://github.com/signalapp/libsignal.git
synced 2026-04-26 01:35:22 +02:00
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:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user