I remember there is a way to create, inside an interface, a field without specifying its name, something like this:
export interface myInterface{
[propName:string]:string;
}
If I remember well, that sinthax means I can create a field with whatever name I want, something like this:
ob:myInterface = {customName: "value"}
What I'm trying to do now is to add a new field to that interface, with a specific name, something like this:
export interface myInterface{
[propName:string]:string;
secondProperties: boolean;
}
When I try the code above I get this error:
Property 'secondProperties' of type 'boolean' is not assignable to string index type 'string'
What is my error?