Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR TYPESCRIPT

typescript make object optional

objectName: Partial<ObjectType>; //this will make all properties of ObjectType optional
objectName?: ObjectType; //this will make the ObjectName property of type ObjectType optional
 
PREVIOUS NEXT
Tagged: #typescript #object #optional
ADD COMMENT
Topic
Name
2+1 =