packageDocumentation module import * as path from "path" ; import { NodeKey } from "./hierarchy/Key" ; import { KeySet } from "./KeySet" ; public export type Omit < T , K > = Pick < T , Exclude < keyof T , K > > ; public export type Subtract < T , K > = Omit < T , keyof K > ; public export type PartialBy < T , K extends keyof T > = Omit < T , K > & Partial < Pick < T , K > > ; public export interface ValuesDictionary < T > { [ key ] : T ; } public export interface PagedResponse < T > { /** Total number of items */ total : number ; /** Items for the requested page  */ items : T [ ] ; } public export const getInstancesCount = ( keys ) : number => { let count = keys . instanceKeysCount ; keys . nodeKeys . forEach ( ( key ) => { if ( NodeKey . isInstancesNodeKey ( key ) ) { count += key . instanceKeys . length ; } else if ( NodeKey . isGroupingNodeKey ( key ) ) { count += key . groupedInstancesCount ; } } ) ; return count ; } ; public export const DEFAULT_KEYS_BATCH_SIZE = 5000 ; internal export const PRESENTATION_COMMON_ROOT = __dirname ; internal export const getLocalesDirectory = ( assetsDirectory ) => path . join ( assetsDirectory , "locales" ) ;