import Vnmf from '../../index' declare module '../../index' { namespace onMemoryWarning { /** Reaction function for an event whose memory is not sufficient to warn the alarm */ type Callback = ( result: CallbackResult, ) => void interface CallbackResult { /** Memory alarm level,It's just... Android No, it's not.,Reciprocal system macro definition */ level: keyof Level } interface Level { /** TRIM_MEMORY_RUNNING_MODERATE */ 5 /** TRIM_MEMORY_RUNNING_LOW */ 10 /** TRIM_MEMORY_RUNNING_CRITICAL */ 15 } } interface VnmfStatic { /** The bugging of memory is an alarm.。 * * ♪ When iOS/Android When sending a memory warning to the applet process,Trigger the event。The triggering of this incident doesn't mean that the program was killed.,Most of the time, it's just a warning.,Developers can recover some of the resources they need to avoid further straining their memory when notified.。 * @supported weapp, tt * @example * ```tsx * Vnmf.onMemoryWarning(function () { * console.log('onMemoryWarningReceive') * }) * ``` * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/performance/wx.onMemoryWarning.html */ onMemoryWarning( /** Reaction function for an event whose memory is not sufficient to warn the alarm */ callback: onMemoryWarning.Callback, ): void /** Disable bugging for alarm.。 * @supported weapp * @see https://developers.weixin.qq.com/miniprogram/dev/api/device/memory/wx.offMemoryWarning.html */ offMemoryWarning( /** Disable bugging for alarm. */ callback: onMemoryWarning.Callback, ): void } }