Customer.Ts:
class CustomerDetails{
public CustomerName: string = "";
public CustomerNumber: int = 0;
}
class CustomerDetails{
public CustomerName: string = "";
public CustomerNumber: int = 0;
}
- First should define the type of scope "Public / Private / Protected etc....".
- Next, give the name of the varible.
- Next, provide the type of variable as "string / int / boolean etc...." but before this we should have ":" to declare the type of variable.