zefoy / ngx-dropzone-wrapper

Angular wrapper library for Dropzone
MIT License
174 stars 51 forks source link

TS Weak Types causing issues. #59

Closed ismi2014 closed 7 years ago

ismi2014 commented 7 years ago

Getting the following error in Angular 5.0.0:

error TS2559: Type 'InjectionToken<{}>' has no properties in common with type 'DropzoneConfigInterface'.

A quick fix to get it working was to modify dropzone.module.d.ts line 7: from: static forRoot(config?: DropzoneConfigInterface): ModuleWithProviders; to: static forRoot(config?: any): ModuleWithProviders;

I believe this is related to the changes done in the latest TS weak types. https://blogs.msdn.microsoft.com/typescript/2017/06/12/announcing-typescript-2-4-rc/

In TypeScript 2.4, it’s now an error to assign anything to a weak type when there’s no overlap in properties.

sconix commented 7 years ago

I will be making new 5.0.0 release soon now when Angular 5 is out. Although I haven't seen that error with Angular 4 and Typescript 2.5 nor with Angular 5 rc releases.