SYS_Help.help() method
查询 Help 信息(渐进式)
签名
typescript
function help(
namespace?: string,
className?: string,
methodName?: string,
): Promise<ISYS_HelpData | Record<string, any> | ISYS_HelpClassSummary | ISYS_HelpMethodDetail>;1
2
3
4
5
2
3
4
5
参数名
参数 | 类型 | 描述 |
|---|---|---|
namespace | string | (可选) 命名空间: |
className | string | (可选) 类名 / 命名空间下的分组名(external 场景为注册时的 namespace) |
methodName | string | (可选) 方法名 / 接口名 |
返回值
Promise<ISYS_HelpData | Record<string, any> | ISYS_HelpClassSummary | ISYS_HelpMethodDetail>
渐进式查询结果:
- 无参:返回
{ eda: { className: [方法列表] }, external: { namespace: { apiName: 标题 } } }总览; - 仅namespace:返回该命名空间下各分组及其方法列表; -namespace+className:返回该分组内所有方法摘要; - 三个参数齐全:返回单方法的完整详情(入参、出参、返回值)
示例
javascript
// 1. 总览
const overview = await eda.sys_Help.help();
// 2. 查看 eda 下 lib_Device 类的方法
const deviceMethods = await eda.sys_Help.help('eda', 'lib_Device');
// 3. 查看 create 方法的完整用法
const createDoc = await eda.sys_Help.help('eda', 'lib_Device', 'create');
// 4. 查看外部注入接口
const externalInfo = await eda.sys_Help.help('external', 'component', 'placeComponent');1
2
3
4
5
6
7
8
9
10
11
2
3
4
5
6
7
8
9
10
11