Home Manual Reference Source Test

Function

Static Public Summary
public

disposeAndRemoveEntry(func: *, context: *, list: *, isTicker: *)

public

executeAsync(predicate: *, apiFunc: *): *

public

executeEntries(entries: array, callLater: boolean): number

Executes all the stored functions , if callLater enabled, executes them in frame cycle

public

executeInSyncOrAsync(predicate: function, apiFunc: function, callback: function, errorCallback: function): void

Based on return value of predicate, this function decides whether to execute the method immediately or in frame cycle

Static Public

public disposeAndRemoveEntry(func: *, context: *, list: *, isTicker: *) source

import {disposeAndRemoveEntry} from '@statetree/functions/lib/helpers.js'

Params:

NameTypeAttributeDescription
func *
context *
list *
isTicker *

public executeAsync(predicate: *, apiFunc: *): * source

import {executeAsync} from '@statetree/functions/lib/helpers.js'

Params:

NameTypeAttributeDescription
predicate *
apiFunc *

Return:

*

public executeEntries(entries: array, callLater: boolean): number source

import {executeEntries} from '@statetree/functions/lib/helpers.js'

Executes all the stored functions , if callLater enabled, executes them in frame cycle

Params:

NameTypeAttributeDescription
entries array

of which contains the function and its context.

callLater boolean

indicates execution needs to happen in frame cycle

Return:

number

return count of entries that are added to execute in loop later

public executeInSyncOrAsync(predicate: function, apiFunc: function, callback: function, errorCallback: function): void source

import {executeInSyncOrAsync} from '@statetree/functions/lib/helpers.js'

Based on return value of predicate, this function decides whether to execute the method immediately or in frame cycle

Params:

NameTypeAttributeDescription
predicate function
apiFunc function
callback function

Api func execution may be sync or Async, if its sync we cant return notifier as user can register doneCallback after API invocation

errorCallback function

Return:

void