Options
All
  • Public
  • Public/Protected
  • All
Menu

External module "Util"

Index

Functions

DeferredPromise

  • DeferredPromise<T>(): Promise.Resolver<T>
  • Type parameters

    • T

    Returns Promise.Resolver<T>

assertArray

  • assertArray(x: any): void
  • Parameters

    • x: any

    Returns void

assertNotNegative

  • assertNotNegative(v: number, message?: string): void
  • Parameters

    • v: number
    • Default value message: string = "The value cannot be negative."

    Returns void

assertNotNull

  • assertNotNull(v: any): void
  • Parameters

    • v: any

    Returns void

assertString

  • assertString(v: any): void
  • Parameters

    • v: any

    Returns void

cancelRepetitionTask

  • cancelRepetitionTask(task: Task): void

copyObjectShallow

  • copyObjectShallow<T>(obj: T): T
  • Type parameters

    • T

    Parameters

    • obj: T

    Returns T

createComparator

enumFromString

  • enumFromString<T>(enumType: any, value: string): T
  • Type parameters

    • T

    Parameters

    • enumType: any
    • value: string

    Returns T

getBooleanOrUndefined

  • getBooleanOrUndefined(val: any): boolean
  • Parameters

    • val: any

    Returns boolean

getNodejsMajorVersion

  • getNodejsMajorVersion(): number

getSortedQueryResultSet

getStringOrUndefined

  • getStringOrUndefined(val: any): string
  • Parameters

    • val: any

    Returns string

getType

  • getType(obj: any): string
  • Parameters

    • obj: any

    Returns string

loadNameFromPath

  • loadNameFromPath(path: string, exportedName: string): any
  • Parameters

    • path: string
    • exportedName: string

    Returns any

mergeJson

  • mergeJson(base: any, other: any): void
  • Parameters

    • base: any
    • other: any

    Returns void

randomInt

  • randomInt(upperBound: number): number
  • Returns a random integer between 0(inclusive) and upperBound(exclusive) Upper bound should be an integer.

    Parameters

    • upperBound: number

    Returns number

    A random integer between [0-upperBound)

resolvePath

  • resolvePath(path: string): string
  • Parameters

    • path: string

    Returns string

scheduleWithRepetition

  • scheduleWithRepetition(callback: function, initialDelay: number, periodMillis: number): Task
  • Parameters

    • callback: function
        • (...args: any[]): void
        • Parameters

          • Rest ...args: any[]

          Returns void

    • initialDelay: number
    • periodMillis: number

    Returns Task

setAnchor

  • setAnchor(list: any[], predicate: PagingPredicate, nearestPage: number): void

shuffleArray

  • shuffleArray<T>(array: T[]): void
  • Type parameters

    • T

    Parameters

    • array: T[]

    Returns void

tryGetArray

  • tryGetArray(val: any): any[]
  • Parameters

    • val: any

    Returns any[]

tryGetBoolean

  • tryGetBoolean(val: any): boolean
  • Parameters

    • val: any

    Returns boolean

tryGetEnum

  • tryGetEnum<T>(enumClass: any | object, str: string): T
  • Type parameters

    • T

    Parameters

    • enumClass: any | object
    • str: string

    Returns T

tryGetNumber

  • tryGetNumber(val: any): number
  • Parameters

    • val: any

    Returns number

tryGetString

  • tryGetString(val: any): string
  • Parameters

    • val: any

    Returns string

Generated using TypeDoc