Use Record<string,*> instead of Record<number,*>

Objects in js are alwais indexed by strings.
This commit is contained in:
Jannis Mattheis 2019-09-28 16:45:07 +02:00
parent d302940da6
commit 147ff271f8
2 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ interface IState {
@observer
class Messages extends Component<IProps & Stores<'messagesStore' | 'appStore'>, IState> {
@observable
private heights: Record<number, number> = {};
private heights: Record<string, number> = {};
private static appId(props: IProps) {
if (props === undefined) {

View File

@ -17,7 +17,7 @@ interface MessagesState {
export class MessagesStore {
@observable
private state: Record<number, MessagesState> = {};
private state: Record<string, MessagesState> = {};
private loading = false;