Skip to content

Commit

Permalink
Moves methods to new interface to account for none-listable resources
Browse files Browse the repository at this point in the history
  • Loading branch information
coconutcraig committed Nov 15, 2018
1 parent f6078c5 commit cc99c49
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/types/resources.d.ts
Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
export interface Resource {
get(): Promise<any>;

on(page: number): this;

sortBy(sortable: string): this;
}

export interface Listable extends Resource {
on(page: number): this;

take(limit: number): this;
}

export interface UserResource extends Resource {
export interface UserResource extends Listable {
assigned(assigned: boolean): this;

at(location: number | string): this;
Expand Down

0 comments on commit cc99c49

Please sign in to comment.