js:add lib and .d.ts

This commit is contained in:
pengfei.zhou
2020-01-03 14:44:51 +08:00
committed by osborn
parent 624e90e4a8
commit 7cde16a75d
84 changed files with 3794 additions and 19 deletions

24
doric-js/lib/src/native/modal.d.ts vendored Normal file
View File

@@ -0,0 +1,24 @@
import { BridgeContext } from "../runtime/global";
import { Gravity } from "../util/gravity";
export declare function modal(context: BridgeContext): {
toast: (msg: string, gravity?: Gravity) => void;
alert: (arg: string | {
title: string;
msg: string;
okLabel?: string | undefined;
}) => Promise<any>;
confirm: (arg: string | {
title: string;
msg: string;
okLabel?: string | undefined;
cancelLabel?: string | undefined;
}) => Promise<any>;
prompt: (arg: {
title?: string | undefined;
msg?: string | undefined;
okLabel?: string | undefined;
cancelLabel?: string | undefined;
text?: string | undefined;
defaultText?: string | undefined;
}) => Promise<string>;
};