node-argon2
node-argon2 copied to clipboard
Fix: Add missing properties and correct types in Options typedef
Issue
- close #403
Remarks
-
saltLengthno longer exists- added to JSdoc Options
- the type of
saltisany | undefinedinstead ofBuffer | undefined- is generated correctly when I run
tsc(npm run prepare)
- is generated correctly when I run
- the type of
associatedDataisany | undefinedinstead ofBuffer | undefined- is generated correctly when I run
tsc(npm run prepare)
- is generated correctly when I run
- the type of
secretisany | undefinedinstead ofBuffer | undefined- is generated correctly when I run
tsc(npm run prepare)
- is generated correctly when I run
Generated type
// argon2.d.cts
export type Options = {
hashLength?: number | undefined;
timeCost?: number | undefined;
memoryCost?: number | undefined;
parallelism?: number | undefined;
type?: 0 | 2 | 1 | undefined;
version?: number | undefined;
salt?: Buffer | undefined;
associatedData?: Buffer | undefined;
secret?: Buffer | undefined;
saltLength?: number | undefined;
};
Are there any blocking points on your side @ranisalt that still prevent the correction of this issue? Don't hesitate if you need help
saltLength is not an option anymore, so it should not be present in the options type
The types of salt, associatedData and secret also generate properly as Buffer | undefined for me, the issue is in CI when they are generated before publishing. We need to investigate that further
The wrong buffer types have been fixed in v0.41.1