angular interface optional attribute code example
Example: ts interface optional parameter
interface Person {
name: string;
age: number;
phone?: string;
}
let p: Person = {name: "Ashlee", age: 29};
console.log(p);
interface Person {
name: string;
age: number;
phone?: string;
}
let p: Person = {name: "Ashlee", age: 29};
console.log(p);