export type Omit < T , K extends keyof T > = Pick < T , Exclude < keyof T , K > > ; export param { string } stability returns { boolean } export function isStable ( stability ) { return stability !== 'deprecated' ; } export param { * } tree returns export function treeNodeCount ( tree ) { return tree . reduce ( ( acc , curr ) => { let childSum ; if ( curr . children ) { childSum = treeNodeCount ( curr . children ) ; return ++ acc + childSum ; } return ++ acc ; } , 0 ) ; } export param { * } tree returns export function rawNodesWithMethodCount ( tree ) { return tree . filter ( node => { let childHadMethod ; if ( node . method ) { return node ; } if ( node . children ) { childHadMethod = rawNodesWithMethodCount ( node . children ) ; } return childHadMethod ; } ) . length ; } export param { * } apiList returns export function validApiRefCount ( apiList ) { return apiList . reduce ( ( acc , curr ) => { const itemCount = curr . items . reduce ( ( a , node ) => { if ( node . stability === 'deprecated' ) { return a ; } return ++ a ; } , 0 ) ; return acc + itemCount ; } , 0 ) ; }