padlocal / wechaty-puppet-padlocal-demo

65 stars 36 forks source link

Property 'options' is protected but type 'PuppetPadlocal' is not a class derived from 'Puppet'. #2

Closed Yinetsrl closed 3 years ago

Yinetsrl commented 3 years ago

Run the demo and encounter the following error

`TSError: ⨯ Unable to compile TypeScript: main.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" | ... 4 more ... | Puppet'. Type 'PuppetPadlocal' is not assignable to type 'Puppet'. Property 'options' is protected but type 'PuppetPadlocal' is not a class derived from 'Puppet'.

11 puppet,


  ../node_modules/wechaty/dist/src/wechaty.d.ts:12:5
    12     puppet?: PuppetModuleName | Puppet;
The expected type comes from property 'puppet' which is declared here on type 'WechatyOptions'

at createTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:513:12)
at reportTSError (/usr/local/lib/node_modules/ts-node/src/index.ts:517:19)
at getOutput (/usr/local/lib/node_modules/ts-node/src/index.ts:752:36)
at Object.compile (/usr/local/lib/node_modules/ts-node/src/index.ts:968:32)
at Module.m._compile (/usr/local/lib/node_modules/ts-node/src/index.ts:1056:42)
at Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Object.require.extensions.<computed> [as .ts] (/usr/local/lib/node_modules/ts-node/src/index.ts:1059:12)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)`
padlocal commented 3 years ago

fixed in version wechaty-puppet-padlocal@0.2.8, please upgrade your client and try again.