import Vnmf from '../../index' declare module '../../index' { namespace setTopBarText { interface Option { /** Top Bar Text */ text: string /** Interface calls a successful echo function */ success?: (res: VnmfGeneral.CallbackResult) => void /** Interface call failed echo function */ fail?: (res: VnmfGeneral.CallbackResult) => void /** Interface call to the end of echo function(Call successfully、Any failure will be enforced.) */ complete?: (res: VnmfGeneral.CallbackResult) => void } } interface VnmfStatic { /** Dynamic set-up topbar text content。It's only effective when the micro-procedure is over.,If the current applet is not toped,And you can call it a success.,But it won't be effective immediately.,Change the set text content only after user tops this applet. * * **Attention.** * - After Call Successful,Required interval 5s To call this interface again,♪ If it's in 5s Call this interface again inside,I'll call back. fail,errMsg:"setTopBarText: fail invoke too frequently" * @supported weapp * @example * ```tsx * Vnmf.setTopBarText({ * text: 'hello, world!' * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/ui/sticky/wx.setTopBarText.html */ setTopBarText(option: setTopBarText.Option): Promise } }