Usually in typescript you\'d use the pattern that you declare a type:
type O = {"key1": string, "key2": int}
and then you can decl