UNPKG

@toloka-dev/tbx-external-field-client

Version:

Library designed to facilitate communication and configuration management between TBX and an external app

15 lines (12 loc) 765 B
import * as penpal from 'penpal'; import { Theme, ExternalFieldClientParentApi } from '../types.js'; interface CreateFieldExternalConnectionOptions<Value = any, Config extends Record<string, unknown> = Record<string, unknown>> { onChangeConfig?: (changedConfig: Config) => void; onChangeValue?: (changedValue: Value | null) => void; onChangeTheme?: (changedTheme: Theme) => void; } declare const createFieldExternalConnection: <Value = any, Config extends Record<string, unknown> = Record<string, unknown>>(options: CreateFieldExternalConnectionOptions<Value, Config>) => { promise: Promise<penpal.AsyncMethodReturns<ExternalFieldClientParentApi<any, Record<string, unknown>>>>; destroy: Function; }; export { createFieldExternalConnection };