Home > LIB_Device > delete
LIB_Device.delete() method
This API is provided as a beta preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
Delete Device
Signature
typescript
function delete(deviceUuid: string, libraryUuid: string): Promise<boolean>;1
Parameters
Parameter | Type | Description |
|---|---|---|
deviceUuid | string | Device UUID |
libraryUuid | string | Library UUID, you can use LIB_LibrariesList APIs in |
Returns
Promise<boolean>
Whether the operation is successful
Example
javascript
// 1. 获取个人库 UUID 并新建删除对象
const libraryUuid = await eda.lib_LibrariesList.getPersonalLibraryUuid();
const deviceUuid = await eda.lib_Device.create(
libraryUuid,
`嘉立创示例_待删除_${Date.now()}`,
[],
{ symbolType: 2 }
);
// 2. 删除该器件
const deleted = await eda.lib_Device.delete(deviceUuid, libraryUuid);
console.log('deviceUuid:', deviceUuid);
console.log('deleted:', deleted);1
2
3
4
5
6
7
8
9
10
11
12
13
14
2
3
4
5
6
7
8
9
10
11
12
13
14