class angular get/set optional code example
Example: angular make variable optional
export interface User {
id: number;
name?: string; // interfaces allow fields to be optional
}
export interface User {
id: number;
name?: string; // interfaces allow fields to be optional
}