@etsoo/appscript
Version:
Applications shared TypeScript framework
41 lines (40 loc) • 1.18 kB
TypeScript
import { DataTypes } from "@etsoo/shared";
import { BridgeHostName, IBridgeHost } from "./IBridgeHost";
type CallHandlerType = (name: string, ...args: unknown[]) => PromiseLike<DataTypes.StringRecord | void>;
/**
* Flutter JavaScript Host
* https://inappwebview.dev/docs/javascript/communication/
*/
export declare class FlutterHost implements IBridgeHost {
private host;
/**
* Name
*/
readonly name = BridgeHostName.Flutter;
/**
* Start Url
*/
private startUrl;
/**
* Cached commands
*/
private cachedCommands;
/**
* Constructor
* @param callHandler Call handler
*/
constructor(host: {
callHandler?: CallHandlerType;
});
cacheCommand(name: string, ...args: unknown[]): void;
changeCulture(locale: string): void;
closable(): boolean;
exit(): void;
getLabels<T extends string>(...keys: T[]): Promise<any>;
getStartUrl(): string | null | undefined;
loadApp(name: string, startUrl?: string): void;
userAuthorization(authorized: boolean): void;
onUpdate(func: (app: string, version: string) => void): void;
setTitle(title: string): void;
}
export {};