Closed ainilili closed 4 years ago
Thank for your PR, but why we need add ?
here? Could you give me some reason about it?
Thank you very much.
The code in README.md has a problem in my local environment:
C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:434
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
server.ts:51:7 - error TS2769: No overload matches this call.
The last overload gave the following error.
Argument of type '"logout"' is not assignable to parameter of type 'never'.
51 .on('logout', (user: Contact, reason: string) => {
~~~~~~~~
node_modules/wechaty/dist/src/wechaty.d.ts:207:5
207 on(event: never, listener: never): never;
~~
The last overload is declared here.
server.ts:54:4 - error TS2339: Property 'on' does not exist on type 'never'.
54 .on('message', (msg: Message) => {
~~
at createTSError (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:434:12)
at reportTSError (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:438:19)
at getOutput (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:578:36)
at Object.compile (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:775:32)
at Module.m._compile (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:858:43)
at Module._extensions..js (internal/modules/cjs/loader.js:787:10)
at Object.require.extensions.(anonymous function) [as .ts] (C:\Users\admin\AppData\Roaming\npm\node_modules\ts-node\src\index.ts:861:12)
at Module.load (internal/modules/cjs/loader.js:653:32)
at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
at Function.Module._load (internal/modules/cjs/loader.js:585:3)
I'm not sure if this error is going to be a problem in any environment, so I mentioned this PR.
Some compile error about TS.
Maybe you should do some configurations step by step, see more detail: https://github.com/wechaty/wechaty-puppet-padplus/blob/master/readme.md
Support for latest version !
I'm submitting a...