I have typed my object of objects as:
export interface ObjectInterface {
[key: string]: SomeOtherObjectInterface;
}
Then let's say I have object like:
const obj: ObjectInterface = {
a: ...,
b: ...,
}
Then when I want to access some object property it is not type-safe:
const x = obj.dsdssdsdsds;
There is no error within my IDE.
When I remove type from obj it throws an error properly. What could be done here to use our type but still get errors like Property 'dsds' does not exist on type......