提交 85ac7f60 编写于 作者: Huan (李卓桓)'s avatar Huan (李卓桓)

dodc

上级 ba23bf20
......@@ -47,11 +47,11 @@ Wechaty.instance() // Singleton
Return version of Wechaty
**Kind**: instance method of <code>[Wechaty](#Wechaty)</code>
**Returns**: <code>string</code> - version number
**Returns**: <code>string</code> - version - number
| Param | Type | Default | Description |
| --- | --- | --- | --- |
| [forceNpm] | <code>boolean</code> | <code>false</code> | if set to true, will only return the version in package.json. otherwise will return git commit hash if .git exists. |
| [forceNpm] | <code>boolean</code> | <code>false</code> | if set to true, will only return the version in package.json. otherwise will return git commit hash if .git exists. |
**Example**
```js
......
......@@ -133,9 +133,9 @@ export class Wechaty extends EventEmitter implements Sayable {
/**
* Return version of Wechaty
* @param {boolean} [forceNpm=false] if set to true, will only return the version in package.json.
* otherwise will return git commit hash if .git exists.
* @returns {string} version number
* @param {boolean} [forceNpm=false] - if set to true, will only return the version in package.json.
* otherwise will return git commit hash if .git exists.
* @returns {string} version - number
* @example
* console.log(Wechaty.instance().version())
* // '#git[af39df]'
......@@ -234,9 +234,9 @@ export class Wechaty extends EventEmitter implements Sayable {
// public on(event: WechatyEventName, listener: Function): this
/**
* @listens Wechaty#error
* @param [event='error'] {string} the `error` event
* @param listener {Function} listener (error) => void callback function
* @return {Wechaty} this for chain
* @param {string} [event='error'] - the `error` event name
* @param {Function} listener - (error) => void callback function
* @return {Wechaty} - this for chain
*/
public on(event: 'error' , listener: (this: Wechaty, error: Error) => void): this
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册