I have an IBase interface and a variable that contains several other objects (in the example, I just added a base for a better demonstration)
interface IBase {
height?:number;
width?:number;
}
var element = {
base: {
}
}
How can I say that an object that has a varable element.base element is of type IBase? I know that I can create a type for an element variable that contains database types, etc., but it is also possible to enter this script without this.
source
share