Options
All
  • Public
  • Public/Protected
  • All
Menu

Hierarchy

  • default

Index

Constructors

  • new default(params: boolean | { compatMode?: boolean; dynamic?: boolean }): default

Properties

_compatMode: boolean
dynamic: boolean
hooks: Record<string, (params: unknown) => Promise<unknown>> = {}
methods: RpcMethod[] = []
notifications: Record<string, Notification> = {}
onInit: (params: unknown) => unknown = ...

Type declaration

    • (params: unknown): unknown
    • Parameters

      • params: unknown

      Returns unknown

options: Record<string, { default: unknown; description: string; type: string; value: unknown }> = {}
rpc: null | SocketApiClient = null

Methods

  • _getmanifest(params?: unknown): { dynamic: boolean; hooks: string[]; options: { default: unknown; description: string; name: string; type: string }[]; rpcmethods: { description: string; long_description: string; name: string; usage: string }[]; subscriptions: string[] }
  • Parameters

    • Optional params: unknown

    Returns { dynamic: boolean; hooks: string[]; options: { default: unknown; description: string; name: string; type: string }[]; rpcmethods: { description: string; long_description: string; name: string; usage: string }[]; subscriptions: string[] }

    • dynamic: boolean
    • hooks: string[]
    • options: { default: unknown; description: string; name: string; type: string }[]
    • rpcmethods: { description: string; long_description: string; name: string; usage: string }[]
    • subscriptions: string[]
  • _mainLoop(): Promise<void>
  • _write(content: string): Promise<void>
  • _writeJsonrpcNotification(method: string, params: unknown): Promise<void>
  • _writeJsonrpcResponse(result: unknown, id: string | number, isError?: boolean): Promise<void>
  • addHook(name: string, callback: () => Promise<unknown>): void
  • addMethod(name: string, callback: (params: unknown) => unknown, usage: string, description: string, longDescription: string): void
  • Parameters

    • name: string
    • callback: (params: unknown) => unknown
        • (params: unknown): unknown
        • Parameters

          • params: unknown

          Returns unknown

    • usage: string
    • description: string
    • longDescription: string

    Returns void

  • addOption(name: string, defaultValue: unknown, description: string, type: string): void
  • log(message: string, level?: string): void
  • start(): void
  • subscribe(name: string): void

Generated using TypeDoc