From f167800113c4aeb7f034c9443ce4ecb84a3df9ef Mon Sep 17 00:00:00 2001 From: Phil Kunz Date: Mon, 27 Jul 2020 18:17:52 +0000 Subject: [PATCH] fix(core): update --- ts/smartstate.classes.smartstate.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/ts/smartstate.classes.smartstate.ts b/ts/smartstate.classes.smartstate.ts index 5a06e78..3a9e3d7 100644 --- a/ts/smartstate.classes.smartstate.ts +++ b/ts/smartstate.classes.smartstate.ts @@ -5,12 +5,12 @@ import { StatePart } from './smartstate.classes.statepart'; * Smartstate takes care of providing state */ export class Smartstate { - public statePartMap: { [key: string]: StatePart } = {}; + public statePartMap: { [key: string]: StatePart } = {}; constructor() {} public getStatePart( - statePartNameArg: StatePartNameType, + statePartNameArg: string & StatePartNameType, initialArg?: PayloadType ): StatePart { if (this.statePartMap[statePartNameArg as any]) { @@ -19,7 +19,7 @@ export class Smartstate { `${statePartNameArg} already exists, yet you try to set an initial state again` ); } - return this.statePartMap[statePartNameArg as any]; + return this.statePartMap[statePartNameArg] as StatePart; } else { if (!initialArg) { throw new Error(