# 升级<a name="ZH-CN_TOPIC_0000001115974768"></a>

-   [导入模块](#zh-cn_topic_0000001149710363_section749mcpsimp)
-   [权限列表](#zh-cn_topic_0000001149710363_section752mcpsimp)
-   [updater.getNewVersionInfo\(\)](#zh-cn_topic_0000001149710363_section755mcpsimp)
-   [updater.checkNewVersion\(\)](#zh-cn_topic_0000001149710363_section817mcpsimp)
-   [updater.download\(\)](#zh-cn_topic_0000001149710363_section879mcpsimp)
-   [updater.upgrade\(\)](#zh-cn_topic_0000001149710363_section894mcpsimp)
-   [updater.setUpdatePolicy\(\)](#zh-cn_topic_0000001149710363_section909mcpsimp)
-   [updater.getUpdatePolicy\(\)](#zh-cn_topic_0000001149710363_section985mcpsimp)

## 导入模块<a name="zh-cn_topic_0000001149710363_section749mcpsimp"></a>

```
import client from 'libupdateclient.z.so'
```

## 权限列表<a name="zh-cn_topic_0000001149710363_section752mcpsimp"></a>

无。

## updater.getNewVersionInfo\(\)<a name="zh-cn_topic_0000001149710363_section755mcpsimp"></a>

获取新版本信息。

**参数：**

<a name="zh-cn_topic_0000001149710363_table760mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row767mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149710363_p769mcpsimp"><a name="zh-cn_topic_0000001149710363_p769mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p769mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149710363_p771mcpsimp"><a name="zh-cn_topic_0000001149710363_p771mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p771mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="9%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149710363_p773mcpsimp"><a name="zh-cn_topic_0000001149710363_p773mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p773mcpsimp"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="66%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149710363_p775mcpsimp"><a name="zh-cn_topic_0000001149710363_p775mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p775mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row777mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149710363_p779mcpsimp"><a name="zh-cn_topic_0000001149710363_p779mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p779mcpsimp"></a>callback</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149710363_p781mcpsimp"><a name="zh-cn_topic_0000001149710363_p781mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p781mcpsimp"></a>Function</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149710363_p783mcpsimp"><a name="zh-cn_topic_0000001149710363_p783mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p783mcpsimp"></a>否</p>
</td>
<td class="cellrowborder" valign="top" width="66%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149710363_p785mcpsimp"><a name="zh-cn_topic_0000001149710363_p785mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p785mcpsimp"></a>AsyncCallback&lt;NewVersionInfo&gt;</p>
</td>
</tr>
</tbody>
</table>

**返回值：**

<a name="zh-cn_topic_0000001149710363_table788mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row794mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149710363_p796mcpsimp"><a name="zh-cn_topic_0000001149710363_p796mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p796mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="13%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149710363_p798mcpsimp"><a name="zh-cn_topic_0000001149710363_p798mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p798mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="68%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149710363_p800mcpsimp"><a name="zh-cn_topic_0000001149710363_p800mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p800mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row802mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149710363_p804mcpsimp"><a name="zh-cn_topic_0000001149710363_p804mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p804mcpsimp"></a>info</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149710363_p806mcpsimp"><a name="zh-cn_topic_0000001149710363_p806mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p806mcpsimp"></a>NewVersionInfo</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149710363_p808mcpsimp"><a name="zh-cn_topic_0000001149710363_p808mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p808mcpsimp"></a>新版本信息</p>
</td>
</tr>
</tbody>
</table>

**示例：**

```
updater.getNewVersionInfo(info => {
console.log("getNewVersionInfo sucess  " + info.status);
console.log(`info versionName = ` + info.result[0].versionName);
console.log(`info versionCode = ` + info.result[0].versionCode);
console.log(`info verifyInfo = ` + info.result[0].verifyInfo);
)};
```

## updater.checkNewVersion\(\)<a name="zh-cn_topic_0000001149710363_section817mcpsimp"></a>

检查新版本。

**参数：**

<a name="zh-cn_topic_0000001149710363_table822mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row829mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149710363_p831mcpsimp"><a name="zh-cn_topic_0000001149710363_p831mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p831mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149710363_p833mcpsimp"><a name="zh-cn_topic_0000001149710363_p833mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p833mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="9%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149710363_p835mcpsimp"><a name="zh-cn_topic_0000001149710363_p835mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p835mcpsimp"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="66%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149710363_p837mcpsimp"><a name="zh-cn_topic_0000001149710363_p837mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p837mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row839mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149710363_p841mcpsimp"><a name="zh-cn_topic_0000001149710363_p841mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p841mcpsimp"></a>callback</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149710363_p843mcpsimp"><a name="zh-cn_topic_0000001149710363_p843mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p843mcpsimp"></a>Function</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149710363_p845mcpsimp"><a name="zh-cn_topic_0000001149710363_p845mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p845mcpsimp"></a>否</p>
</td>
<td class="cellrowborder" valign="top" width="66%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149710363_p847mcpsimp"><a name="zh-cn_topic_0000001149710363_p847mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p847mcpsimp"></a>AsyncCallback&lt;NewVersionInfo&gt;</p>
</td>
</tr>
</tbody>
</table>

**返回值：**

<a name="zh-cn_topic_0000001149710363_table850mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row856mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149710363_p858mcpsimp"><a name="zh-cn_topic_0000001149710363_p858mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p858mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="13%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149710363_p860mcpsimp"><a name="zh-cn_topic_0000001149710363_p860mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p860mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="68%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149710363_p862mcpsimp"><a name="zh-cn_topic_0000001149710363_p862mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p862mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row864mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149710363_p866mcpsimp"><a name="zh-cn_topic_0000001149710363_p866mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p866mcpsimp"></a>info</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149710363_p868mcpsimp"><a name="zh-cn_topic_0000001149710363_p868mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p868mcpsimp"></a>NewVersionInfo</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149710363_p870mcpsimp"><a name="zh-cn_topic_0000001149710363_p870mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p870mcpsimp"></a>新版本信息</p>
</td>
</tr>
</tbody>
</table>

**示例：**

```
updater.checkNewVersion(info => {
console.log("checkNewVersion sucess  " + info.status);
console.log(`info versionName = ` + info.result[0].versionName);
console.log(`info versionCode = ` + info.result[0].versionCode);
console.log(`info verifyInfo = ` + info.result[0].verifyInfo);
)};
```

## updater.download\(\)<a name="zh-cn_topic_0000001149710363_section879mcpsimp"></a>

下载新版本，并监听下载进程。

**参数：**

无

**返回值：**

无

**示例：**

```
updater.on("downloadProgress", progress => {
console.log("downloadProgress on" + progress);
console.log(`downloadProgress status: ` + progress.status);
console.log(`downloadProgress percent: ` + progress.percent);
)};
updater.download();
```

## updater.upgrade\(\)<a name="zh-cn_topic_0000001149710363_section894mcpsimp"></a>

启动升级。

**参数：**

无

**返回值：**

无

**示例：**

```
updater.on("upgradeProgress", progress => {
console.log("downloadProgress on" + progress);
console.log(`downloadProgress status: ` + progress.status);
console.log(`downloadProgress percent: ` + progress.percent);
)};
updater.upgrade();
```

## updater.setUpdatePolicy\(\)<a name="zh-cn_topic_0000001149710363_section909mcpsimp"></a>

设置升级策略。

**参数：**

<a name="zh-cn_topic_0000001149710363_table914mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row921mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149710363_p923mcpsimp"><a name="zh-cn_topic_0000001149710363_p923mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p923mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149710363_p925mcpsimp"><a name="zh-cn_topic_0000001149710363_p925mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p925mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="9%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149710363_p927mcpsimp"><a name="zh-cn_topic_0000001149710363_p927mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p927mcpsimp"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="66%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149710363_p929mcpsimp"><a name="zh-cn_topic_0000001149710363_p929mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p929mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row931mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149710363_p933mcpsimp"><a name="zh-cn_topic_0000001149710363_p933mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p933mcpsimp"></a>policy</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149710363_p935mcpsimp"><a name="zh-cn_topic_0000001149710363_p935mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p935mcpsimp"></a>UpdatePolicy</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149710363_p937mcpsimp"><a name="zh-cn_topic_0000001149710363_p937mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p937mcpsimp"></a>是</p>
</td>
<td class="cellrowborder" valign="top" width="66%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149710363_p939mcpsimp"><a name="zh-cn_topic_0000001149710363_p939mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p939mcpsimp"></a>设置策略</p>
</td>
</tr>
<tr id="zh-cn_topic_0000001149710363_row940mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149710363_p942mcpsimp"><a name="zh-cn_topic_0000001149710363_p942mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p942mcpsimp"></a>callback</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149710363_p944mcpsimp"><a name="zh-cn_topic_0000001149710363_p944mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p944mcpsimp"></a>Function</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149710363_p946mcpsimp"><a name="zh-cn_topic_0000001149710363_p946mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p946mcpsimp"></a>是</p>
</td>
<td class="cellrowborder" valign="top" width="66%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149710363_p948mcpsimp"><a name="zh-cn_topic_0000001149710363_p948mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p948mcpsimp"></a>AsyncCallback&lt;number&gt;</p>
</td>
</tr>
</tbody>
</table>

**返回值：**

<a name="zh-cn_topic_0000001149710363_table951mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row957mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149710363_p959mcpsimp"><a name="zh-cn_topic_0000001149710363_p959mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p959mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="13%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149710363_p961mcpsimp"><a name="zh-cn_topic_0000001149710363_p961mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p961mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="68%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149710363_p963mcpsimp"><a name="zh-cn_topic_0000001149710363_p963mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p963mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row965mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149710363_p967mcpsimp"><a name="zh-cn_topic_0000001149710363_p967mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p967mcpsimp"></a>result</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149710363_p969mcpsimp"><a name="zh-cn_topic_0000001149710363_p969mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p969mcpsimp"></a>number</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.1.4.1.3 ">&nbsp;&nbsp;</td>
</tr>
</tbody>
</table>

**示例：**

```
// 设置策略
let policy = {
autoDownload: false,
autoDownloadNet: true,
mode: 2,
autoUpgradeInterval: [ 2, 3 ],
autoUpgradeCondition: 2
}
updater.setUpdatePolicy(policy, function(result) {
console.log("setUpdatePolicy ", result)
}
);
```

## updater.getUpdatePolicy\(\)<a name="zh-cn_topic_0000001149710363_section985mcpsimp"></a>

查看升级策略。

**参数：**

<a name="zh-cn_topic_0000001149710363_table990mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row997mcpsimp"><th class="cellrowborder" valign="top" width="11%" id="mcps1.1.5.1.1"><p id="zh-cn_topic_0000001149710363_p999mcpsimp"><a name="zh-cn_topic_0000001149710363_p999mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p999mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="14.000000000000002%" id="mcps1.1.5.1.2"><p id="zh-cn_topic_0000001149710363_p1001mcpsimp"><a name="zh-cn_topic_0000001149710363_p1001mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1001mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="9%" id="mcps1.1.5.1.3"><p id="zh-cn_topic_0000001149710363_p1003mcpsimp"><a name="zh-cn_topic_0000001149710363_p1003mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1003mcpsimp"></a>必填</p>
</th>
<th class="cellrowborder" valign="top" width="66%" id="mcps1.1.5.1.4"><p id="zh-cn_topic_0000001149710363_p1005mcpsimp"><a name="zh-cn_topic_0000001149710363_p1005mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1005mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row1007mcpsimp"><td class="cellrowborder" valign="top" width="11%" headers="mcps1.1.5.1.1 "><p id="zh-cn_topic_0000001149710363_p1009mcpsimp"><a name="zh-cn_topic_0000001149710363_p1009mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1009mcpsimp"></a>callback</p>
</td>
<td class="cellrowborder" valign="top" width="14.000000000000002%" headers="mcps1.1.5.1.2 "><p id="zh-cn_topic_0000001149710363_p1011mcpsimp"><a name="zh-cn_topic_0000001149710363_p1011mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1011mcpsimp"></a>Function</p>
</td>
<td class="cellrowborder" valign="top" width="9%" headers="mcps1.1.5.1.3 "><p id="zh-cn_topic_0000001149710363_p1013mcpsimp"><a name="zh-cn_topic_0000001149710363_p1013mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1013mcpsimp"></a>是</p>
</td>
<td class="cellrowborder" valign="top" width="66%" headers="mcps1.1.5.1.4 "><p id="zh-cn_topic_0000001149710363_p1015mcpsimp"><a name="zh-cn_topic_0000001149710363_p1015mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1015mcpsimp"></a>AsyncCallback&lt;UpdatePolicy&gt;</p>
</td>
</tr>
</tbody>
</table>

**返回值：**

<a name="zh-cn_topic_0000001149710363_table1018mcpsimp"></a>
<table><thead align="left"><tr id="zh-cn_topic_0000001149710363_row1024mcpsimp"><th class="cellrowborder" valign="top" width="19%" id="mcps1.1.4.1.1"><p id="zh-cn_topic_0000001149710363_p1026mcpsimp"><a name="zh-cn_topic_0000001149710363_p1026mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1026mcpsimp"></a>参数名</p>
</th>
<th class="cellrowborder" valign="top" width="13%" id="mcps1.1.4.1.2"><p id="zh-cn_topic_0000001149710363_p1028mcpsimp"><a name="zh-cn_topic_0000001149710363_p1028mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1028mcpsimp"></a>类型</p>
</th>
<th class="cellrowborder" valign="top" width="68%" id="mcps1.1.4.1.3"><p id="zh-cn_topic_0000001149710363_p1030mcpsimp"><a name="zh-cn_topic_0000001149710363_p1030mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1030mcpsimp"></a>说明</p>
</th>
</tr>
</thead>
<tbody><tr id="zh-cn_topic_0000001149710363_row1032mcpsimp"><td class="cellrowborder" valign="top" width="19%" headers="mcps1.1.4.1.1 "><p id="zh-cn_topic_0000001149710363_p1034mcpsimp"><a name="zh-cn_topic_0000001149710363_p1034mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1034mcpsimp"></a>policy</p>
</td>
<td class="cellrowborder" valign="top" width="13%" headers="mcps1.1.4.1.2 "><p id="zh-cn_topic_0000001149710363_p1036mcpsimp"><a name="zh-cn_topic_0000001149710363_p1036mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1036mcpsimp"></a>UpdatePolicy</p>
</td>
<td class="cellrowborder" valign="top" width="68%" headers="mcps1.1.4.1.3 "><p id="zh-cn_topic_0000001149710363_p1038mcpsimp"><a name="zh-cn_topic_0000001149710363_p1038mcpsimp"></a><a name="zh-cn_topic_0000001149710363_p1038mcpsimp"></a>策略</p>
</td>
</tr>
</tbody>
</table>

**示例：**

```
updater.getUpdatePolicy(policy => {
console.log("getUpdatePolicy sucess", policy)
});
```

