UNPKG

@gaoding/open-sdk

Version:

- 稿定设计开放平台对接SDK。

22 lines (21 loc) 816 B
import { Methods } from 'penpal'; export interface Options<T extends Methods> { methods?: T; timeout?: number; debug?: boolean; } export interface ParentConnectionOptions<T extends Methods> extends Options<T> { iframe: HTMLIFrameElement; childOrigin?: string; } export interface ChildConnectionOptions<T extends Methods> extends Options<T> { parentOrigin?: string | RegExp; } export declare function useParentConnector<T extends Methods>(): { update: (options: ParentConnectionOptions<T>) => Promise<void>; getService: () => Promise<import("penpal").AsyncMethodReturns<T>>; }; export declare function useChildConnector<T extends Methods>(): { update: (options: ChildConnectionOptions<T>) => Promise<void>; getService: () => Promise<import("penpal").AsyncMethodReturns<T>>; };