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

Implicit return in auth0-spa-js/src/cache /cache-manager.ts when TS "noImplicitReturns" is set to true #1280

Open
6 tasks done
denniscalazans opened this issue Jun 21, 2024 · 1 comment
Assignees
Labels
bug This points to a verified bug in the code

Comments

@denniscalazans
Copy link

Checklist

Description

private async getCacheKeys(): Promise<string[] | undefined> {
if (this.keyManifest) {
return (await this.keyManifest.get())?.keys;
} else if (this.cache.allKeys) {
return this.cache.allKeys();
}
}

Reproduction

Install Auth0 library

  • npm i --save @auth0/auth0-spa-js

  • Make use of it

  • npm run build the angular project

✘ [ERROR] TS7030: Not all code paths return a value. [plugin angular-compiler]

    ../../node_modules/@auth0/auth0-spa-js/src/cache/cache-manager.ts:156:32:
      156 │   private async getCacheKeys(): Promise<string[] | undefined> {
          ╵                                 ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Additional context

No response

auth0-spa-js version

2.1.3

Which framework are you using (React, Angular, Vue...)?

Angular

Framework version

17

Which browsers have you tested in?

Other

@denniscalazans denniscalazans added the bug This points to a verified bug in the code label Jun 21, 2024
@denniscalazans denniscalazans changed the title Implicit return in auth0-spa-js/src/cache /cache-manager.ts Implicit return in auth0-spa-js/src/cache /cache-manager.ts when TS "noImplicitReturns" is set to true Jun 21, 2024
@nandan-bhat
Copy link

Hello @denniscalazans ,

I am not seeing the error you mentioned when I use [email protected] along with [email protected]. Can you share your package.json here ?

Additionally, could you provide a code snippet demonstrating how you are using [email protected] ?. This would be helpful.

@nandan-bhat nandan-bhat self-assigned this Jun 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug This points to a verified bug in the code
Projects
None yet
Development

No branches or pull requests

2 participants