zhangyuanwei / node-images

Cross-platform image decoder(png/jpeg/gif) and encoder(png/jpeg) for Nodejs
https://npmjs.org/package/images
MIT License
1.55k stars 204 forks source link

ts声明报错了 #225

Closed yajore closed 3 years ago

yajore commented 3 years ago

node_modules/_images@3.2.3@images/index.d.ts:31:21 - error TS1039: Initializers are not allowed in ambient contexts.

31 fillColor = this.fill;

x1n13y84issmd42 commented 3 years ago

Having the same issue on TS 4.2.4 and latest images. Changing the initializer to a function declaration fixes the problem, but that's not an option for us.

x1n13y84issmd42 commented 3 years ago

As a workaround for this you can set skipLibCheck: true in tsconfig.json.

yajore commented 3 years ago

3q,the problem has been solved