From 1118753ab927959ebe5167a3c50ae5e00bee89ce Mon Sep 17 00:00:00 2001 From: Brandon Roberts Date: Thu, 5 Oct 2017 13:38:02 -0500 Subject: [PATCH] Change Dictionary to abstract class to provide index signature --- modules/entity/src/models.ts | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/modules/entity/src/models.ts b/modules/entity/src/models.ts index c235c87460..d1ba0692b9 100644 --- a/modules/entity/src/models.ts +++ b/modules/entity/src/models.ts @@ -18,15 +18,13 @@ export type IdSelectorNum = { export type IdSelector = IdSelectorStr | IdSelectorNum; -export type DictionaryStr = { - [id: string]: T; -}; - export type DictionaryNum = { [id: number]: T; }; -export type Dictionary = DictionaryStr | DictionaryNum; +export abstract class Dictionary implements DictionaryNum { + [id: string]: T; +} export type UpdateStr = { id: string;