Is it possible to indicate to Typescript that val
can only be a string
in the following example?
type Object = {[key: string]: string}
const test = (obj: Object) => {
let val: keyof typeof obj;
// How can we specify that the type of `val` is only string?
}