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

Updated minor syntax, to allow for TypeScript compiler to be happier #714

Merged
merged 5 commits into from
Mar 8, 2021
Merged
Changes from 4 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
13 changes: 7 additions & 6 deletions src/Auth0Client.ts
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,8 @@ import {
OAuthTokenOptions,
CacheLocation,
LogoutUrlOptions,
User
User,
IdToken
} from './global';

// @ts-ignore
Expand Down Expand Up @@ -419,10 +420,10 @@ export default class Auth0Client {
* (the SDK stores a corresponding ID Token with every Access Token, and uses the
* scope and audience to look up the ID Token)
*
* @typeparam TUser The type to return, has to extend {@link User}. Defaults to {@link User} when omitted.
* @typeparam TUser The type to return, has to extend {@link User}.
* @param options
*/
public async getUser<TUser extends User = User>(
public async getUser<TUser extends User>(
options: GetUserOptions = {}
): Promise<TUser | undefined> {
const audience = options.audience || this.options.audience || 'default';
Expand Down Expand Up @@ -452,7 +453,7 @@ export default class Auth0Client {
*
* @param options
*/
public async getIdTokenClaims(options: GetIdTokenClaimsOptions = {}) {
public async getIdTokenClaims(options: GetIdTokenClaimsOptions = {}): Promise<IdToken> {
const audience = options.audience || this.options.audience || 'default';
const scope = getUniqueScopes(this.defaultScope, this.scope, options.scope);

Expand Down Expand Up @@ -827,8 +828,8 @@ export default class Auth0Client {
nonceIn,
code_challenge,
options.redirect_uri ||
this.options.redirect_uri ||
window.location.origin
this.options.redirect_uri ||
window.location.origin
);

const url = this._authorizeUrl({
Expand Down