Skip to main content

@webda/awsReadme | API


Class: LambdaServer

The Lambda entrypoint for Webda

This take the input coming from the API Gateway to transform it and analyse it with Webda Once execution is done, it will format the result in a way that the API Gateway will output the result You need to use the Webda deployment so the API Gateway has all the right templates in place

Extends

  • Core

Constructors

new LambdaServer(application)

new LambdaServer(application?): LambdaServer

Parameters

application?: Application

Returns

LambdaServer

Inherited from

Webda.constructor

Params

config - The configuration Object, if undefined will load the configuration file

Source

packages/core/lib/core.d.ts:318

Properties

_ajv

protected _ajv: Ajv

JSON Schema validator instance

Inherited from

Webda._ajv

Source

packages/core/lib/core.d.ts:218


_ajvSchemas

protected _ajvSchemas: Object

JSON Schema registry Save if a schema was added to Ajv already

Index signature

[key: string]: true

Inherited from

Webda._ajvSchemas

Source

packages/core/lib/core.d.ts:223


_awsEventsHandlers

_awsEventsHandlers: AWSEventsHandler[] = []

Source

packages/aws/src/services/lambdaserver.ts:40


_configFile

protected _configFile: string

Inherited from

Webda._configFile

Source

packages/core/lib/core.d.ts:230


_currentExecutor

protected _currentExecutor: any

Current executor

Inherited from

Webda._currentExecutor

Source

packages/core/lib/core.d.ts:229


_init

protected _init: Promise<void>

Init promise to ensure, webda is initiated Used for init() method

Inherited from

Webda._init

Source

packages/core/lib/core.d.ts:209


_initPromise

protected _initPromise: Promise<void>

Contains the current initialization process

Inherited from

Webda._initPromise

Source

packages/core/lib/core.d.ts:234


_initTime

protected _initTime: number

When the Core was initialized

Inherited from

Webda._initTime

Source

packages/core/lib/core.d.ts:238


_initiated

protected _initiated: boolean

If Core is already initiated

Inherited from

Webda._initiated

Source

packages/core/lib/core.d.ts:198


_requestCORSFilters

protected _requestCORSFilters: RequestFilter<WebContext<any, any>>[]

CORS Filter registry

Added via [[Webda.registerCORSRequestFilter]] See [[CorsFilter]]

Inherited from

Webda._requestCORSFilters

Source

packages/core/lib/core.d.ts:257


_requestFilters

protected _requestFilters: RequestFilter<WebContext<any, any>>[]

Request Filter registry

Added via [[Webda.registerRequestFilter]] See [[CorsFilter]]

Inherited from

Webda._requestFilters

Source

packages/core/lib/core.d.ts:250


_result

_result: Object

Type declaration

body?

body?: any

headers?

headers?: any

multiValueHeaders?

multiValueHeaders?: any

statusCode?

statusCode?: number

Source

packages/aws/src/services/lambdaserver.ts:34


application

protected application: Application

Application that generates this Core

Inherited from

Webda.application

Source

packages/core/lib/core.d.ts:190


cryptoService

protected cryptoService: default<CryptoServiceParameters>

Manage encryption within the application

Inherited from

Webda.cryptoService

Source

packages/core/lib/core.d.ts:275


failedServices

protected failedServices: Object

Services who failed to create or initialize

Index signature

[key: string]: any

Inherited from

Webda.failedServices

Source

packages/core/lib/core.d.ts:202


globalContext

protected globalContext: GlobalContext

System context

Inherited from

Webda.globalContext

Source

packages/core/lib/core.d.ts:308


interuptables

interuptables: Object[]

Inherited from

Webda.interuptables

Source

packages/core/lib/core.d.ts:312


operations

protected operations: Object

Contains all operations defined by services

Index signature

[key: string]: OperationDefinitionInfo

Inherited from

Webda.operations

Source

packages/core/lib/core.d.ts:279


registry

protected registry: Store<any, StoreParameters, StoreEvents>

Application registry

Inherited from

Webda.registry

Source

packages/core/lib/core.d.ts:271


router

protected router: Router

Router that will route http request in

Inherited from

Webda.router

Source

packages/core/lib/core.d.ts:194


captureRejectionSymbol

static readonly captureRejectionSymbol: typeof captureRejectionSymbol

Inherited from

Webda.captureRejectionSymbol

Source

node_modules/@types/node/events.d.ts:38


captureRejections

static captureRejections: boolean

Sets or gets the default captureRejection value for all emitters.

Inherited from

Webda.captureRejections

Source

node_modules/@types/node/events.d.ts:44


defaultMaxListeners

static defaultMaxListeners: number

Inherited from

Webda.defaultMaxListeners

Source

node_modules/@types/node/events.d.ts:45


errorMonitor

static readonly errorMonitor: typeof errorMonitor

This symbol shall be used to install a listener for only monitoring 'error' events. Listeners installed using this symbol are called before the regular 'error' listeners are called.

Installing a listener using this symbol does not change the behavior once an 'error' event is emitted, therefore the process will still crash if no regular 'error' listener is installed.

Inherited from

Webda.errorMonitor

Source

node_modules/@types/node/events.d.ts:37

Methods

addListener()

addListener(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.addListener

Source

node_modules/@types/node/events.d.ts:57


addRoute()

addRoute(url, info): void

Add a route dynamicaly

Parameters

url: string

of the route can contains dynamic part like {uuid}

info: RouteInfo

the type of executor

Returns

void

Inherited from

Webda.addRoute

Source

packages/core/lib/core.d.ts:508


callOperation()

callOperation(context, operationId): Promise<any>

Call an operation within the framework

Parameters

context: OperationContext<any, any>

operationId: string

Returns

Promise<any>

Inherited from

Webda.callOperation

Source

packages/core/lib/core.d.ts:444


checkCORSRequest()

protected checkCORSRequest(ctx): Promise<boolean>

Verify if an origin is allowed to do request on the API

Parameters

ctx: WebContext<any, any>

Returns

Promise<boolean>

Inherited from

Webda.checkCORSRequest

Source

packages/core/lib/core.d.ts:711


checkOperation()

checkOperation(context, operationId): Promise<void>

Check if an operation can be executed with the current context

Parameters

context: OperationContext<any, any>

operationId: string

Returns

Promise<void>

Inherited from

Webda.checkOperation

Source

packages/core/lib/core.d.ts:440


checkOperationPermission()

checkOperationPermission(context, operationId): boolean

Check if an operation can be executed with the current context Not checking the input use checkOperation instead to check everything

Parameters

context: OperationContext<any, any>

operationId: string

Returns

boolean

true if operation can be executed

Inherited from

Webda.checkOperationPermission

Throws

OperationError if operation is unknown

Source

packages/core/lib/core.d.ts:434


checkRequest()

protected checkRequest(ctx): Promise<boolean>

Verify if a request can be done

Parameters

ctx: WebContext<any, any>

Returns

Promise<boolean>

Inherited from

Webda.checkRequest

Source

packages/core/lib/core.d.ts:705


computePrefix()

computePrefix(event, httpContext): void

Based on API Gateway event compute the prefix if any

Parameters

event: any

httpContext: HttpContext

Returns

void

Source

packages/aws/src/services/lambdaserver.ts:277


createService()

protected createService(services, service): void

Parameters

services: any

service: string

Returns

void

Inherited from

Webda.createService

Source

packages/core/lib/core.d.ts:617


emit()

emit<K>(eventType, event?, ...data?): boolean

Type parameters

K extends keyof CoreEvents

Parameters

eventType: string | symbol | K

event?: CoreEvents[K]

• ...data?: any[]

Returns

boolean

Inherited from

Webda.emit

Source

packages/core/lib/core.d.ts:677


emitSync()

emitSync<K>(eventType, event?, ...data?): Promise<any[]>

Emit the event with data and wait for Promise to finish if listener returned a Promise

Type parameters

K extends keyof CoreEvents

Parameters

eventType: symbol | K

event?: CoreEvents[K]

• ...data?: any[]

Returns

Promise<any[]>

Inherited from

Webda.emitSync

Source

packages/core/lib/core.d.ts:681


eventNames()

eventNames(): (string | symbol)[]

Returns

(string | symbol)[]

Inherited from

Webda.eventNames

Source

node_modules/@types/node/events.d.ts:72


exportOpenAPI()

exportOpenAPI(skipHidden?): Document<Object>

Export OpenAPI

Parameters

skipHidden?: boolean

Returns

Document<Object>

Inherited from

Webda.exportOpenAPI

Source

packages/core/lib/core.d.ts:717


flush()

flush(ctx): void

Parameters

ctx: WebContext<any, any>

Returns

void

Overrides

Webda.flush

Inherit Doc

Source

packages/aws/src/services/lambdaserver.ts:64


getApiUrl()

getApiUrl(subpath?): string

Get absolute url with subpath

Parameters

subpath?: string

Returns

string

Inherited from

Webda.getApiUrl

Source

packages/core/lib/core.d.ts:381


getAppPath()

getAppPath(subpath?): string

Return application path with subpath

Helper that redirect to this.application.getAppPath

Parameters

subpath?: string

Returns

string

Inherited from

Webda.getAppPath

Source

packages/core/lib/core.d.ts:390


getApplication()

getApplication(): Application

Return application definition

Returns

Application

Inherited from

Webda.getApplication

Source

packages/core/lib/core.d.ts:398


getBeans()

getBeans(): any

Returns

any

Inherited from

Webda.getBeans

Source

packages/core/lib/core.d.ts:618


getBinaryStore()

getBinaryStore<T>(modelOrConstructor, attribute): BinaryService<BinaryParameters, BinaryEvents>

Get the service that manage a model

Type parameters

T extends CoreModel

Parameters

modelOrConstructor: T | Constructor<T>

attribute: string

Returns

BinaryService<BinaryParameters, BinaryEvents>

Inherited from

Webda.getBinaryStore

Source

packages/core/lib/core.d.ts:370


getConfiguration()

getConfiguration(): Configuration

Returns

Configuration

Inherited from

Webda.getConfiguration

Source

packages/core/lib/core.d.ts:540


getCrypto()

getCrypto(): default<CryptoServiceParameters>

Return the crypto service

Returns

default<CryptoServiceParameters>

Inherited from

Webda.getCrypto

Source

packages/core/lib/core.d.ts:633


getGlobalContext()

getGlobalContext(): GlobalContext

Get the system context

Returns

GlobalContext

Inherited from

Webda.getGlobalContext

Source

packages/core/lib/core.d.ts:589


getGlobalParams()

getGlobalParams(): any

Return the global parameters of a domain

Returns

any

Inherited from

Webda.getGlobalParams

Source

packages/core/lib/core.d.ts:584


getInstanceId()

getInstanceId(): string

Return Core instance id

It is a random generated string

Returns

string

Inherited from

Webda.getInstanceId

Source

packages/core/lib/core.d.ts:376


getLocales()

getLocales(): string[]

To define the locales just add a locales: ['en-GB', 'fr-FR'] in your host global configuration

Returns

string[]

The configured locales or "en-GB" if none are defined

Inherited from

Webda.getLocales

Source

packages/core/lib/core.d.ts:496


getLogger()

getLogger(clazz): Logger

Get a Logger for a class

Parameters

clazz: string | Service<ServiceParameters, Events>

Returns

Logger

Inherited from

Webda.getLogger

Source

packages/core/lib/core.d.ts:501


getMaxListeners()

getMaxListeners(): number

Returns

number

Inherited from

Webda.getMaxListeners

Source

node_modules/@types/node/events.d.ts:64


getMetric()

getMetric<T>(type, configuration): T

Get a metric object

Use the Service.getMetric method if possible

This is map from prometheus 3 types of metrics Our hope is that we can adapt them to export to other metrics system if needed

Type parameters

T = Counter<string> | Histogram<string> | Gauge<string>

Parameters

type: Constructor<T, [MetricConfiguration<T, string>]>

configuration: MetricConfiguration<T, string>

Returns

T

Inherited from

Webda.getMetric

Source

packages/core/lib/core.d.ts:731


getModel()

getModel<T>(name): CoreModelDefinition<T>

Check for a model name and return the wanted class or throw exception if none found

Type parameters

T extends CoreModel = CoreModel

Parameters

name: any

The model name to retrieve

Returns

CoreModelDefinition<T>

Inherited from

Webda.getModel

Source

packages/core/lib/core.d.ts:560


getModelObject()

getModelObject<T>(fullUuid, partials?): Promise<T>

Get an object from the application based on its full uuid

Type parameters

T extends CoreModel = CoreModel

Parameters

fullUuid: string

partials?: any

Returns

Promise<T>

Inherited from

Webda.getModelObject

Source

packages/core/lib/core.d.ts:413


getModelStore()

getModelStore<T>(modelOrConstructor): Store<T, StoreParameters, StoreEvents>

Get the store assigned to this model

Type parameters

T extends CoreModel

Parameters

modelOrConstructor: T | Constructor<T>

Returns

Store<T, StoreParameters, StoreEvents>

Inherited from

Webda.getModelStore

Source

packages/core/lib/core.d.ts:363


getModels()

getModels(): Object

Return a map of defined models

Returns

Object

Inherited from

Webda.getModels

Source

packages/core/lib/core.d.ts:552


getModules()

getModules(): CachedModule

Retrieve all detected modules definition

Returns

CachedModule

Inherited from

Webda.getModules

Source

packages/core/lib/core.d.ts:394


getRegistry()

getRegistry(): Store<any, StoreParameters, StoreEvents>

A registry is a predefined store

Returns

Store<any, StoreParameters, StoreEvents>

Inherited from

Webda.getRegistry

Source

packages/core/lib/core.d.ts:628


getRouter()

getRouter(): Router

Return current Router object

Returns

Router

Inherited from

Webda.getRouter

Source

packages/core/lib/core.d.ts:518


getService()

getService<T>(name?): T

Check for a service name and return the wanted singleton or undefined if none found

Type parameters

T extends Service<ServiceParameters, Events>

Parameters

name?: string

The service name to retrieve

Returns

T

Inherited from

Webda.getService

Source

packages/core/lib/core.d.ts:524


getServiceParams()

getServiceParams(service, configuration?): any

Get a full resolved service parameter

Parameters

service: string

configuration?: Object

configuration.parameters?: any

configuration.services?: any

Returns

any

Inherited from

Webda.getServiceParams

Source

packages/core/lib/core.d.ts:613


getServices()

getServices(): Object

Return a map of defined services

Returns

Object

Inherited from

Webda.getServices

Source

packages/core/lib/core.d.ts:529


getServicesOfType()

getServicesOfType<T>(type?): Object

Return a map of services that extends type

Type parameters

T extends Service<ServiceParameters, Events>

Parameters

type?: Constructor<T, [Core<CoreEvents>, string, any]>

The type of implementation

Returns

Object

Inherited from

Webda.getServicesOfType

Source

packages/core/lib/core.d.ts:537


getStores()

getStores(): Object

Return a map of defined stores

Returns

Object

Inherited from

Webda.getStores

Source

packages/core/lib/core.d.ts:545


getUuid()

getUuid(format?): string

Return a UUID

Parameters

format?: "hex" | "base64" | "uuid" | "ascii" | "binary"

to return different type of format Plan to implement base64 and maybe base85

Returns

string

Inherited from

Webda.getUuid

Source

packages/core/lib/core.d.ts:673


getVersion()

getVersion(): string

Return webda current version

Returns

string

package version

Inherited from

Webda.getVersion

Since

0.4.0

Source

packages/core/lib/core.d.ts:490


getWorkerOutput()

getWorkerOutput(): WorkerOutput

Get WorkerOutput

Returns

WorkerOutput

Inherited from

Webda.getWorkerOutput

Source

packages/core/lib/core.d.ts:402


handleAWSEvents()

handleAWSEvents(events): Promise<boolean>

Analyse events to try to find its type

Parameters

events: any

Returns

Promise<boolean>

Source

packages/aws/src/services/lambdaserver.ts:95


handleLambdaReturn()

handleLambdaReturn(context): Promise<Object>

Collect result from Context to this._result and return it

Parameters

context: WebContext<any, any>

Returns

Promise<Object>

body?

body?: any

headers?

headers?: any

multiValueHeaders?

multiValueHeaders?: any

statusCode?

statusCode?: number

Source

packages/aws/src/services/lambdaserver.ts:294


init()

init(): Promise<void>

Init Webda

It will resolve Services init method and autolink

Returns

Promise<void>

Inherited from

Webda.init

Source

packages/core/lib/core.d.ts:419


initService()

protected initService(service): Promise<void>

Init one service

Parameters

service: string

Returns

Promise<void>

Inherited from

Webda.initService

Source

packages/core/lib/core.d.ts:407


initStatics()

initStatics(): void

Init services and Beans along with Routes

Returns

void

Inherited from

Webda.initStatics

Source

packages/core/lib/core.d.ts:643


isDebug()

isDebug(): boolean

Return if Webda is in debug mode

Returns

boolean

Inherited from

Webda.isDebug

Source

packages/core/lib/core.d.ts:580


jsonFilter()

protected jsonFilter(key, value): any

Parameters

key: string

value: any

Returns

any

Inherited from

Webda.jsonFilter

Source

packages/core/lib/core.d.ts:638


listOperations()

listOperations(): Object

Get available operations

Returns

Object

Inherited from

Webda.listOperations

Source

packages/core/lib/core.d.ts:449


listenerCount()

listenerCount(event): number

Parameters

event: string | symbol

Returns

number

Inherited from

Webda.listenerCount

Source

node_modules/@types/node/events.d.ts:68


listeners()

listeners(event): Function[]

Parameters

event: string | symbol

Returns

Function[]

Inherited from

Webda.listeners

Source

node_modules/@types/node/events.d.ts:65


log()

log(level, ...args): void

Logs

Parameters

level: WorkerLogLevel

• ...args: any[]

Returns

void

Inherited from

Webda.log

Source

packages/core/lib/core.d.ts:695


newContext()

newContext<T>(info, noInit?): Promise<OperationContext<any, any>>

Get a context based on the info

Type parameters

T extends OperationContext<any, any>

Parameters

info: ContextProviderInfo

noInit?: boolean

Returns

Promise<OperationContext<any, any>>

Inherited from

Webda.newContext

Source

packages/core/lib/core.d.ts:649


newWebContext()

newWebContext<T>(httpContext, stream?, noInit?): Promise<T>

Create a new context for a request

Type parameters

T extends WebContext<any, any>

Parameters

httpContext: HttpContext

THe HTTP request context

stream?: Writable

The request output stream if any

noInit?: boolean

Returns

Promise<T>

A new context object to pass along

Inherited from

Webda.newWebContext

Source

packages/core/lib/core.d.ts:658


off()

off(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.off

Source

node_modules/@types/node/events.d.ts:61


on()

on<Key>(event, listener): this

Type the listener part

Type parameters

Key extends keyof CoreEvents

Parameters

event: symbol | Key

listener: (evt) => void

Returns

this

Inherited from

Webda.on

Source

packages/core/lib/core.d.ts:689


once()

once(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.once

Source

node_modules/@types/node/events.d.ts:59


parameter()

parameter(name): any

Retrieve a global parameter

Parameters

name: string

Returns

any

Inherited from

Webda.parameter

Source

packages/core/lib/core.d.ts:699


prependListener()

prependListener(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.prependListener

Source

node_modules/@types/node/events.d.ts:70


prependOnceListener()

prependOnceListener(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.prependOnceListener

Source

node_modules/@types/node/events.d.ts:71


rawListeners()

rawListeners(event): Function[]

Parameters

event: string | symbol

Returns

Function[]

Inherited from

Webda.rawListeners

Source

node_modules/@types/node/events.d.ts:66


registerAWSEventsHandler()

registerAWSEventsHandler(service): void

Register a service to handle AWS Events

Parameters

service: AWSEventsHandler

Returns

void

Source

packages/aws/src/services/lambdaserver.ts:75


registerCORSFilter()

registerCORSFilter(filter): void

Register a CORS request filtering

Does not apply in devMode

Parameters

filter: RequestFilter<WebContext<any, any>>

Returns

void

Inherited from

Webda.registerCORSFilter

Source

packages/core/lib/core.d.ts:471


registerContextProvider()

registerContextProvider(provider): void

Register a new context provider

Parameters

provider: ContextProvider

Returns

void

Inherited from

Webda.registerContextProvider

Source

packages/core/lib/core.d.ts:476


registerOperation()

registerOperation(operationId, definition): void

Register a new operation within the app

Parameters

operationId: string

definition: OperationDefinition

Returns

void

Inherited from

Webda.registerOperation

Source

packages/core/lib/core.d.ts:457


registerRequestFilter()

registerRequestFilter(filter): void

Register a request filtering

Will apply to all requests regardless of the devMode

Parameters

filter: RequestFilter<WebContext<any, any>>

Returns

void

Inherited from

Webda.registerRequestFilter

Source

packages/core/lib/core.d.ts:464


reinit()

reinit(updates): Promise<void>

Reinit all services with updated parameters

Parameters

updates: any

Returns

Promise<void>

Inherited from

Webda.reinit

Source

packages/core/lib/core.d.ts:605


reinitService()

protected reinitService(service): Promise<void>

Reinit one service

Parameters

service: string

Returns

Promise<void>

Inherited from

Webda.reinitService

Source

packages/core/lib/core.d.ts:599


removeAllListeners()

removeAllListeners(event?): this

Parameters

event?: string | symbol

Returns

this

Inherited from

Webda.removeAllListeners

Source

node_modules/@types/node/events.d.ts:62


removeListener()

removeListener(event, listener): this

Parameters

event: string | symbol

listener: (...args) => void

Returns

this

Inherited from

Webda.removeListener

Source

node_modules/@types/node/events.d.ts:60


removeRoute()

removeRoute(url): void

Remove a route dynamicly

Parameters

url: string

to remove

Returns

void

Inherited from

Webda.removeRoute

Source

packages/core/lib/core.d.ts:514


setGlobalContext()

setGlobalContext(context): void

Set the system context

Parameters

context: GlobalContext

Returns

void

Inherited from

Webda.setGlobalContext

Source

packages/core/lib/core.d.ts:594


setMaxListeners()

setMaxListeners(n): this

Parameters

n: number

Returns

this

Inherited from

Webda.setMaxListeners

Source

node_modules/@types/node/events.d.ts:63


setModelStore()

setModelStore(model, store): void

Enforce a specific store for a model

Useful in some specific case when you want to update store dynamically

Parameters

model: Constructor<CoreModel>

store: Store<CoreModel, StoreParameters, StoreEvents>

Returns

void

Inherited from

Webda.setModelStore

Source

packages/core/lib/core.d.ts:357


stop()

stop(): Promise<void>

Stop all services

Returns

Promise<void>

Inherited from

Webda.stop

Source

packages/core/lib/core.d.ts:637


toPublicJSON()

toPublicJSON(object): string

Convert an object to JSON using the Webda json filter

Parameters

object: any

The object to export

Returns

string

The export of the strip object ( removed all attribute with _ )

Inherited from

Webda.toPublicJSON

Source

packages/core/lib/core.d.ts:666


updateContextWithRoute()

updateContextWithRoute(ctx): boolean

Add to context information and executor based on the http context

Parameters

ctx: WebContext<any, any>

Returns

boolean

Inherited from

Webda.updateContextWithRoute

Source

packages/core/lib/core.d.ts:564


validateSchema()

validateSchema(webdaObject, object, ignoreRequired?): true

Validate the object with schema

Parameters

webdaObject: string | CoreModel

object: any

to validate

ignoreRequired?: boolean

Returns

true

Inherited from

Webda.validateSchema

Source

packages/core/lib/core.d.ts:483


get()

static get(): Core<CoreEvents>

Get the singleton of Webda Core

Returns

Core<CoreEvents>

Inherited from

Webda.get

Source

packages/core/lib/core.d.ts:348


getMachineId()

static getMachineId(): string

Returns

string

Inherited from

Webda.getMachineId

Source

packages/core/lib/core.d.ts:639


listenerCount()

static listenerCount(emitter, event): number

Parameters

emitter: EventEmitter

event: string | symbol

Returns

number

Inherited from

Webda.listenerCount

Deprecated

since v4.0.0

Source

node_modules/@types/node/events.d.ts:26


on()

static on(emitter, event): AsyncIterableIterator<any>

Parameters

emitter: EventEmitter

event: string

Returns

AsyncIterableIterator<any>

Inherited from

Webda.on

Source

node_modules/@types/node/events.d.ts:23


once()

once(emitter, event)

static once(emitter, event): Promise<any[]>

Parameters

emitter: NodeEventTarget

event: string | symbol

Returns

Promise<any[]>

Inherited from

Webda.once

Source

node_modules/@types/node/events.d.ts:21

once(emitter, event)

static once(emitter, event): Promise<any[]>

Parameters

emitter: DOMEventTarget

event: string

Returns

Promise<any[]>

Inherited from

Webda.once

Source

node_modules/@types/node/events.d.ts:22


registerInteruptableProcess()

static registerInteruptableProcess(interuptable): void

Register a cancelable process

Parameters

interuptable: Object

interuptable.cancel: () => Promise<void>

Returns

void

Inherited from

Webda.registerInteruptableProcess

Source

packages/core/lib/core.d.ts:323


sleep()

static sleep(time): Promise<void>

Pause for time ms

Parameters

time: any

ms

Returns

Promise<void>

Inherited from

Webda.sleep

Source

packages/core/lib/core.d.ts:425


unregisterInteruptableProcess()

static unregisterInteruptableProcess(interuptable): void

Unregister a cancelable process

Parameters

interuptable: Object

interuptable.cancel: () => Promise<void>

Returns

void

Inherited from

Webda.unregisterInteruptableProcess

Source

packages/core/lib/core.d.ts:330