Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

ts interface optional parameter

interface Person {
    name: string;
    age: number;
    phone?: string;
}

let p: Person = {name: "Ashlee", age: 29};
console.log(p);
Source by www.logicbig.com #
 
PREVIOUS NEXT
Tagged: #ts #interface #optional #parameter
ADD COMMENT
Topic
Name
3+9 =