Skip to content

Commit

Permalink
fix: add type
Browse files Browse the repository at this point in the history
  • Loading branch information
Angular2Guy committed Sep 13, 2022
1 parent 304b78b commit 24c6ac9
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 5 deletions.
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,5 +45,12 @@ The slices are defined in the ChartSlices interface. The interface for the chart

To enable styling the optional 'color' property of the ChartSlice can be used to provide a custom color. It needs to be in Css color format.

## Token Services
The services/interceptors for the Jwt token handling are now included.

To use the token handling this module has to be imported: [NgxServiceModule](https://github.com/Angular2Guy/ngx-simple-charts/blob/master/projects/ngx-simple-charts/base-service/src/lib/ngx-service.module.ts)

Examples howto use it can be found in the [AngularAndSpring](https://github.com/Angular2Guy/AngularAndSpring) and [AngularPortfolioMgr](https://github.com/Angular2Guy/AngularPortfolioMgr) projects.

## Some time in the future
For more features pull requests are welcome.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-simple-charts",
"version": "14.3.0",
"version": "14.3.1",
"license": "Apache License Version 2.0",
"scripts": {
"ng": "ng",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ export class TokenService {
private readonly CACHE_SIZE = 1;
private readonly REFRESH_INTERVAL = 45000; //45 sec
private myToken!: string;
private myUserId!: number;
private myUserId!: number | string;
private myTokenSubscription!: Subscription;
private stopTimer!: Subject<boolean>;
public secUntilNextLogin = 0;
Expand Down Expand Up @@ -125,11 +125,11 @@ export class TokenService {
}
}

public get userId(): number {
public get userId(): number | string {
return this.myUserId;
}

public set userId(userId: number) {
public set userId(userId: number | string) {
this.myUserId = userId;
}
}
Expand Down
2 changes: 1 addition & 1 deletion projects/ngx-simple-charts/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "ngx-simple-charts",
"version": "14.3.0",
"version": "14.3.1",
"license": "Apache License Version 2.0",
"peerDependencies": {
"@angular/common": "^14.0.0",
Expand Down

0 comments on commit 24c6ac9

Please sign in to comment.