I ask for your help because I have created an interface with a boolean field and it is generating a compilation error which I have searched for and I do not know how to solve
Interface:
export interface Empresa {
key$ ? : string;
nombre : string;
nit : number;
estado : boolean;
}
Componente:
empresa : Empresa = {
nombre: "Mi Empresa",
nit : 123245566577,
estado: true
};
Error generated : src / app / components / companies / companies.component.ts (16,5): Type '{name: string; nit: number; state: boolean; } 'is not assignable to type' Company '. Object literal may only specify known properties, and 'status' does not exist in type 'Company'.