Skip to content

Commit

Permalink
Change Dictionary to abstract class to provide index signature
Browse files Browse the repository at this point in the history
  • Loading branch information
brandonroberts committed Oct 5, 2017
1 parent 2102446 commit 1118753
Showing 1 changed file with 3 additions and 5 deletions.
8 changes: 3 additions & 5 deletions modules/entity/src/models.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,15 +18,13 @@ export type IdSelectorNum<T> = {

export type IdSelector<T> = IdSelectorStr<T> | IdSelectorNum<T>;

export type DictionaryStr<T> = {
[id: string]: T;
};

export type DictionaryNum<T> = {
[id: number]: T;
};

export type Dictionary<T> = DictionaryStr<T> | DictionaryNum<T>;
export abstract class Dictionary<T> implements DictionaryNum<T> {
[id: string]: T;
}

export type UpdateStr<T> = {
id: string;
Expand Down

0 comments on commit 1118753

Please sign in to comment.