Skip to content

Commit

Permalink
fix: Use getter for timeline.{home,public}
Browse files Browse the repository at this point in the history
  • Loading branch information
neet committed Mar 17, 2022
1 parent b0325cc commit 99e1c23
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/repositories/timelines-repository.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,14 @@ export interface FetchTimelineParams extends DefaultPaginationParams {
}

export class TimelinesRepository {
readonly home: Paginator<FetchTimelineParams, Status[]>;
readonly public: Paginator<FetchTimelineParams, Status[]>;
constructor(private readonly http: Http, readonly version: string) {}

constructor(private readonly http: Http, readonly version: string) {
this.home = this.getHomeIterable();
this.public = this.getPublicIterable();
get home(): Paginator<FetchTimelineParams, Status[]> {
return this.getHomeIterable();
}

get public(): Paginator<FetchTimelineParams, Status[]> {
return this.getPublicIterable();
}

/**
Expand Down

0 comments on commit 99e1c23

Please sign in to comment.