node-argon2 icon indicating copy to clipboard operation
node-argon2 copied to clipboard

Issue remains: Type regression between v0.31.2 and v0.41.1

Open erichkuba opened this issue 1 year ago • 1 comments

I'm sorry to be the bearer of bad news, but I just tried to upgrade to 0.41.1, and the original problem remains. This is the output that is throwing:

error TS2769: No overload matches this call. Overload 1 of 2, '(password: string | Buffer<ArrayBufferLike>, options: Options & { raw: true; }): Promise<Buffer<ArrayBufferLike>>', gave the following error. Object literal may only specify known properties, and 'saltLength' does not exist in type 'Options & { raw: true; }'. Overload 2 of 2, '(password: string | Buffer<ArrayBufferLike>, options?: Options & { raw?: boolean; }): Promise<string>', gave the following error. Object literal may only specify known properties, and 'saltLength' does not exist in type 'Options & { raw?: boolean; }'.

Originally posted by @erichkuba in https://github.com/ranisalt/node-argon2/issues/403#issuecomment-2532865072

erichkuba avatar Dec 10 '24 20:12 erichkuba

saltLength has been removed, see #441 for reasons

You either can omit it entirely, or you should provide your own salts by passing salt (only do this if you're not hashing passwords!)

ranisalt avatar Apr 24 '25 05:04 ranisalt