Skip to content

Commit

Permalink
Merge pull request #679 from patricio-ezequiel-hondagneu-roig/jwt-hel…
Browse files Browse the repository at this point in the history
…per-service-decode-token-type-hint

feat: add type hinting for the JwtHelperService.decodeToken method
  • Loading branch information
Sambego authored Nov 19, 2020
2 parents 80d8689 + 883561f commit 2bdc702
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion projects/angular-jwt/src/lib/jwthelper.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ export class JwtHelperService {
);
}

public decodeToken(token: string = this.tokenGetter()): any {
public decodeToken<T = any>(token: string = this.tokenGetter()): T {
if (!token || token === "") {
return null;
}
Expand Down

0 comments on commit 2bdc702

Please sign in to comment.