Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "local/main"

Index

Type aliases

ConfigVariables

ConfigVariables: {}

Type declaration

DownloadableServices

DownloadableServices: {}

DownloadableServices, DownloadableService, and ServiceBin can be converted to JSON schema using https://github.com/YousefED/typescript-json-schema

Command to generate JSON Schema: typescript-json-schema --required ./DownloadableServices.d.ts DownloadableServices > ./DownloadableServices.schema.json

description

Downloadable/Available Services for Local

Type declaration

RegisteredServices

RegisteredServices: {}

Type declaration

Scalar

Scalar: string | number | boolean

ServiceContainer

ServiceContainer: AwilixContainer<ServiceContainerServices>

Variables

Const getServiceContainer

getServiceContainer: () => ServiceContainer

Type declaration

Const registerLightningService

registerLightningService: (service: typeof LightningService, serviceName: string, version: string) => void

Type declaration

    • (service: typeof LightningService, serviceName: string, version: string): void
    • Parameters

      Returns void

Functions

addIpcAsyncListener

  • addIpcAsyncListener(channel: string, callback: (...any: any[]) => any): void
  • Utility function for setting up IPC listener on the main thread and replying to it. This should be used only with LocalRenderer.ipcAsync()

    see

    LocalRenderer.ipcAsync()

    Parameters

    • channel: string
    • callback: (...any: any[]) => any
        • (...any: any[]): any
        • Parameters

          • Rest ...any: any[]

          Returns any

    Returns void

childProcessMessagePromiseFactory

  • childProcessMessagePromiseFactory(childProcess: ChildProcess): <T>(eventName: string, payload?: any) => Promise<T>
  • Returns up a helper function to easily communcicate between the main thread and a child thread/process by wrapping an event listener for the "message" event with a promise which allows you to await a "call" to another thread. It also removes the event listener once complete.

    This pairs nicely with the workerFork helper function

    Parameters

    • childProcess: ChildProcess

      childProcess to bind this helper to

    Returns <T>(eventName: string, payload?: any) => Promise<T>

    ChildProcessMessagePromiseHelper

      • <T>(eventName: string, payload?: any): Promise<T>
      • Type parameters

        • T

        Parameters

        • eventName: string
        • Optional payload: any

        Returns Promise<T>

execFilePromise

  • execFilePromise(command: string, args: string[], execFileOptions?: ExecFileOptions): Promise<string>
  • Parameters

    • command: string
    • args: string[]
    • Optional execFileOptions: ExecFileOptions

    Returns Promise<string>

formatHomePath

  • formatHomePath(string: any, untrailingslashit?: boolean): any
  • Parameters

    • string: any
    • Optional untrailingslashit: boolean

    Returns any

sendIPCEvent

  • sendIPCEvent(channel: string, ...args: any[]): void
  • Parameters

    • channel: string
    • Rest ...args: any[]

    Returns void

workerFork

  • workerFork(execPath: any, envVarDependencies: GenericObject): ChildProcess

Generated using TypeDoc