Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Key Type

interface IObjectKeys {
  [key: string]: string | number | undefined;
}

interface IDevice extends IObjectKeys {
  id: number;
  room_id: number;
  name: string;
  type?: string;
  description: string;
}

If you use the optional property in your object;  
you should add 'undefined' value
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #Key #Type
ADD COMMENT
Topic
Name
4+9 =