标志性物品


🌐 Signature objects

函数和回调使用签名对象来描述。

🌐 Functions and callbacks are described with signature objects.

签名对象可能包含以下属性,这些属性都是可选的:

🌐 Signature objects may contain the following properties, both of which are optional:

  • return <string> 一个 类型名称,用来指定函数或回调的返回类型。默认值: 'void'。
  • arguments <string[]> 一个 类型名称 数组,指定函数或回调的参数类型列表。默认值:[]。
const signature = {
  return: 'int32',
  arguments: ['int32', 'int32'],
};