swiftui-shapes icon indicating copy to clipboard operation
swiftui-shapes copied to clipboard

error TS2511: Cannot create an instance of an abstract class.

Open huan opened this issue 3 years ago • 4 comments

After upgrade TypeScript from 3.9 to 4.2, we got the following error message when running tsc

> tsc --noEmit

src/puppet-manager.ts:105:24 - error TS2511: Cannot create an instance of an abstract class.

105       puppetInstance = new MyPuppet(options.puppetOptions)
                           ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~


Found 1 error.

VSCode shows the MyPuppet is const MyPuppet: new (options?: PuppetOptions | undefined) => Puppet

After downgrade to TypeScript 3.9, everything back to normal.

To be investigated.

huan avatar Mar 13 '21 10:03 huan