Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.40.0-alpha.2 raises ts errors #392

Closed
3 tasks done
root-io opened this issue Jan 10, 2024 · 2 comments
Closed
3 tasks done

v0.40.0-alpha.2 raises ts errors #392

root-io opened this issue Jan 10, 2024 · 2 comments

Comments

@root-io
Copy link

root-io commented Jan 10, 2024

Welcome to the issues section if it's your first time!

Before creating an issue, please be sure to:

  • Checkout to the latest version, including submodules
  • Try to find an isolated way to reproduce the behavior
  • Fill in all the blanks in the most specific way you can

Steps to reproduce

pnpm install argon2@next

Expected behaviour

No error with 0.31.2

Actual behaviour

src/Foo.ts:xx:xx - error TS2554: Expected 2 arguments, but got 1.

83     return argon2.hash(password);
                     ~~~~~~~~~~~~~~

  node_modules/.pnpm/argon2@0.40.0-alpha.2/node_modules/argon2/argon2.d.cts:1:46
    1 export function hash(plain: Buffer | string, options: Options & {
                                                   ~~~~~~~~~~~~~~~~~~~~
    2     raw?: boolean | undefined;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 }): Promise<Buffer | string>;
      ~
    An argument for 'options' was not provided.

src/Foo.ts:xx:xx - error TS2554: Expected 2 arguments, but got 1.

98       this.password = await argon2.hash(candidatePassword);
                                      ~~~~~~~~~~~~~~~~~~~~~~~

  node_modules/.pnpm/argon2@0.40.0-alpha.2/node_modules/argon2/argon2.d.cts:1:46
    1 export function hash(plain: Buffer | string, options: Options & {
                                                   ~~~~~~~~~~~~~~~~~~~~
    2     raw?: boolean | undefined;
      ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    3 }): Promise<Buffer | string>;
      ~
    An argument for 'options' was not provided.


Found 2 errors in the same file, starting at: src/Foo.ts:xx

Environment

Operating system:

Node version:
v18.18.2

Compiler version:

@root-io root-io changed the title argon2 0.40.0-alpha.2 ts errors v0.40.0-alpha.2 raises ts errors Jan 10, 2024
@ranisalt
Copy link
Owner

ranisalt commented Jan 10, 2024

Found the issue, 0.40.0-alpha.3 will soon be released with a fix

@root-io
Copy link
Author

root-io commented Jan 10, 2024

Fixed, thanks ;)

@root-io root-io closed this as completed Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants