import defaultTemplate from './template' ; export function hasProperty < T extends Item > ( item , prop ) { return ( item != null ) && item . hasOwnProperty ( prop ) ; } type Lookup = Item | LookupItem | null ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) ; export function isItemSpecificType ( item , itemType ) { return ( item != null ) && item . type === itemType ; } export function isSize ( s ) { return ( s && s . width != null && s . height != null ) ; } export function isPoint ( p ) { return ( p && p . x != null && p . y != null ) ; } export function isBox ( b ) { return ( b && b . x != null && b . y != null && b . width != null && b . height != null ) ; } export function isPointItem ( p ) { return ( p && p . relativeTo != null ) ; } export function isPointListItem ( p ) { return ( p && Array . isArray ( p . points ) ) ; } export function isStepParent ( t ) { return t . hasOwnProperty ( 'steps' ) ; } export function isQuantityLabelParent ( t ) { return t . hasOwnProperty ( 'quantity' ) ; } export function isNotNull < T > ( v ) { return v != null ; } export function isTemplate < T extends BaseTemplate > ( t , type ) { return t . hasOwnProperty ( type ) ; } export function isTemplateType ( p ) { return defaultTemplate . hasOwnProperty ( p ) ; }