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

feat: add typescript declarations #380

Closed
wants to merge 1 commit into from

Conversation

aarongranick-okta
Copy link
Contributor

  • no changes for users of the module who are not using typescript
  • if using typescript, esModuleInterop is required in your tsconfig.json, since this a commonjs module which exports a function (class constructor).
  • types in the library are available in the OktaAuth namespace, which is merged with the OktaAuth class declaration. For example:
import OktaAuth from '@okta/okta-auth-js'
const config:OktaAuth.OktaAuthConfig = {...};
const oktaAuth:OktaAuth = new OktaAuth(config);
const tokenManager:OktaAuth.TokenManagerAPI = oktaAuth.tokenManager;

@aarongranick-okta aarongranick-okta force-pushed the ag-typescript-OKTA-241766 branch from 71ba920 to 2033557 Compare June 8, 2020 21:56
@ekasprzyk
Copy link

Just a reminder that this would be nice to have done, please.

@aarongranick-okta
Copy link
Contributor Author

typescript was shipped with [email protected]

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

Successfully merging this pull request may close these issues.

2 participants