index.d.ts 834 B

123456789101112131415
  1. /// <reference types="miniprogram-api-typings" />
  2. import { MessageProps } from './message.interface';
  3. declare type Context = WechatMiniprogram.Page.TrivialInstance | WechatMiniprogram.Component.TrivialInstance;
  4. interface MessageActionOptionsType extends Optional<MessageProps> {
  5. context?: Context;
  6. selector?: string;
  7. }
  8. declare const _default: {
  9. info(options: MessageActionOptionsType): WechatMiniprogram.Component.TrivialInstance | Promise<never>;
  10. success(options: MessageActionOptionsType): WechatMiniprogram.Component.TrivialInstance | Promise<never>;
  11. warning(options: MessageActionOptionsType): WechatMiniprogram.Component.TrivialInstance | Promise<never>;
  12. error(options: MessageActionOptionsType): WechatMiniprogram.Component.TrivialInstance | Promise<never>;
  13. hide(): void;
  14. };
  15. export default _default;