Skip to main content
Version: v3

clearLaunchAppTimeout

Start from API_LEVEL 2.0 . Please refer to API_LEVEL.

Cancel the wakeup Mini Program timer created by setLaunchAppTimeout.

Type

function clearLaunchAppTimeout(option: Option): void

Simplified calling method

function clearLaunchAppTimeout(timeoutId: number): void

Parameters

Option

PropertyTypeRequiredDefaultValueDescriptionAPI_LEVEL
timeoutIdnumberY-The identifier of the timeout you want to cancel. This ID was returned by the corresponding call to setLaunchAppTimeout()2.0

Result

TypeDescription
numberThe returned value is a positive integer value which identifies the timer created by the call to setLaunchAppTimeout. This value can be passed to clearLaunchAppTimeout to cancel the timeout

Example

import { setLaunchAppTimeout, clearLaunchAppTimeout } from '@zos/router'

const timeoutId = setLaunchAppTimeout({
url: 'pages/js_widget_sample',
appId: 1000001,
delay: 10000,
})

clearLaunchAppTimeout({
timeoutId,
})