I'm creating a model in angular, any element has its own type:
export class myModule {
constructor(
public name: string,
public condition: boolean,
public age: number){}
}
the problem is the type of data is not checked, I can create:
mymodule: myModule = new myModule(3,'hi!', true)
and it works, in name I have 3, in condition, 'hi!' and in age true.
I guess it should be a way to control it, not checking any data individually, isn't?