I use a method to convert a string a keyvalue type:
methodtest(a: KeyValue<any, any>) :string{ // console.log(a.key) return a.key; }