shlomiassaf / ngrid

A angular grid for the enterprise

Home Page:https://shlomiassaf.github.io/ngrid

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Error compiling with angular cli 8.2.5

rpijnacker opened this issue · comments

What is the expected behavior?

Compile and run as previous version

What is the current behavior?

Compilation breaks

What are the steps to reproduce?

Use ngrid as source inside a project. Then upgrade from angular 8.0.3 to latest angular cli version

and this error occurs when compiling

ERROR in libs/ngrid/src/lib/data-source/data-source-adapter.helpers.ts(76,13): error TS2322: Type 'DEEP_COMPARATORS<"data" | "filter" | "sort" | "pagination">[P]' is not assignable to type '(prev: PblDataSourceTriggerCache[P], curr: PblDataSourceTriggerCache[P]) => boolean'.
Type '((prev: RefreshDataWrapper, curr: RefreshDataWrapper) => boolean) | ((prev: DataSourceFilterType, curr: DataSourceFilterType) => boolean) | ((prev: PblNgridDataSourceSortChange, curr: PblNgridDataSourceSortChange) => boolean) | ((prev: { ...; }, curr: { ...; }) => boolean)' is not assignable to type '(prev: PblDataSourceTriggerCache[P], curr: PblDataSourceTriggerCache[P]) => boolean'.

Which versions of Angular, CDK, Material, NGrid, OS, TypeScript, browsers are affected?

Is there anything else we should know?

Hi,
Thats probably related to the TS version you are compiling the project with.

TS versioning is not following SemVer and they do break the API from version to version, which is the case with the last update...

The TS version I use to compile the code is 3.4.5, which compiles through (CLI @ 8.2.2)


As a side note, I would highly recommend to avoid including the source in your project, this will cause a lot of issues for you guys down the road.

The project is compiled and packaged with the official angular tools for building packages, with all bundle types etc... I'm not doing any custom builds here, everything is packages by the angular cli's package builder.

Keeping all of the packages you use in your source code is not a good practice, for that matter are you keeping the @angular/core and @angular/material packages in the source as well?

I'm not sure what environment you're using but you should be having a good debugging experience with the original package as well.

This is not biased or anything, it's really the advice you will get from every angular expert out there... on the long run this will be a nightmare for you..


Doesn't look I can do much to help with this case as this scenario is not supported...

I strongly advise using the original packages from npm, or at least your own build from a private package registry,.