Type 'PuppetPadlocal' is not assignable to type 'Puppet'
suntong opened this issue · 1 comments
suntong commented
$ ts-node main.ts
/usr/lib/node_modules/ts-node/src/index.ts:513
return new TSError(diagnosticText, diagnosticCodes)
^
TSError: ⨯ Unable to compile TypeScript:
starter-bot-padlocal.ts:11:5 - error TS2322: Type 'PuppetPadlocal' is not assignable to type '"@juzibot/wechaty-puppet-donut" | "@juzibot/wechaty-puppet-wxwork" | "wechaty-puppet-hostie" | "wechaty-puppet-mock" | "wechaty-puppet-padplus" | "wechaty-puppet-puppeteer" | ... 5 more ... | undefined'.
Type 'PuppetPadlocal' is not assignable to type 'Puppet'.
Property 'options' is protected but type 'PuppetPadlocal' is not a class derived from 'Puppet'.
11 puppet,
~~~~~~
at createTSError (/usr/lib/node_modules/ts-node/src/index.ts:513:12)
at reportTSError (/usr/lib/node_modules/ts-node/src/index.ts:517:19)
at getOutput (/usr/lib/node_modules/ts-node/src/index.ts:752:36)
at Object.compile (/usr/lib/node_modules/ts-node/src/index.ts:968:32)
at Module.m._compile (/usr/lib/node_modules/ts-node/src/index.ts:1056:42)
at Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
at Object.require.extensions.<computed> [as .ts] (/usr/lib/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:863:32)
at Function.Module._load (internal/modules/cjs/loader.js:708:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
$ ts-node -v
v9.1.1
+-- wechaty@0.50.7
| +-- wechaty-puppet@0.33.6
| | +-- file-box@0.16.4
| +-- wechaty-puppet-hostie@0.11.10
`-- wechaty-puppet-padlocal@0.2.3
+-- wechaty-puppet@0.32.3
| +-- file-box@0.13.9
I'm new to TypeScript. What's wrong with above? thx
The main.ts
is just from this repo.
padlocal commented
Please upgrade wechaty-puppet-padlocal to latest (0.2.31 currently).