0

I've just migrated my project from Angular 13 to Angular 17 and angular-slickgrid from 4.1.4 to 7.5.0 and I cannot build the project. I have fixed all errors but one : Compiling with Angular sources in Ivy full compilation mode. ERROR: node_modules/@slickgrid-universal/common/dist/types/interfaces/column.interface.d.ts:6:189 - error TS2322: Type 'Join<R, D>' is not assignable to type 'string | number | bigint | boolean | null | undefined'.efined'. Type 'unknown' is not assignable to type 'string | number | bigint | boolean | null | undefined'. ever : string; 6 type Join<T extends any[], D extends string> = T extends [] ? never : T extends [infer F] ? F : T extends [infer F, ...infer R] ? F extends string ? string extends F ? string : ${F}${D}${Join<R, D>} : never : string;

And I don't find the reason of this error

I've check every Column implementation in the project to find a reason (bad description, missing field ...) but every piece of code looks good. I've tried to downgrade Typescript but no good effect. I've compared package.json between Latest Angular-Slickgrid-master. Everthing looks the same

5
  • Make sure to follow every Migration Guide 1 by 1. Also make sure to update all Slickgrid-Universal to the correct version assigned to each Angular-Slickgrid version, see version compatibility. My guess is that you jumped way too fast, you should do 1 Angular/Angular-Slickgrid version at a time but it looks like you jumped straight from 4.x to 7.x and that is not a good idea. You should bump to 5.x, test it, then jump to 6.x... Commented Mar 19, 2024 at 14:29
  • I should emphasize again the version compatibility between Angular-Slickgrid and Slickgrid-Universal (see version comp table ref above). I've never found a way to avoid TypeScript throwing interface errors when I bump only Slickgrid-Universal (similar to your question), which is why I always release versions for both on the same day. Internally, the difference is that Angular-Slickgrid extends GridOption with some variances for some options and when Universal is bumped without bumping Angular then it throws weird TS interface errors like yours, so review both Angular/Universal versions Commented Mar 19, 2024 at 17:14
  • I already have this build error with 4.x version. That's why I tried to migrate it. Commented Mar 20, 2024 at 9:30
  • oh wait that's the new TypeScript error that we fixed in this Slickgrid-Universal PR but I didn't release a new version yet. It's caused by a newer version of TypeScript which is more strict than before, if you downgrade to an older version like ~5.2.x it will probably work. I'm still working on some things, I'm not sure when I'll have time to push a new version, so please dowgrade TypeScript or click on the error and change the interface in your node_modules with what is in the PR I referenced Commented Mar 20, 2024 at 13:29
  • Thank you. It was the problem. Downgraded to ~5.2.2 and everything is building now. Commented Mar 21, 2024 at 13:14

1 Answer 1

0

As mentioned in the comments, that was an issue that was brought by recent TypeScript version which is a bit more strict than before. We added a fix in Slickgrid-Universal and in Angular-Slickgrid v7.6.0 which fixes this issue. I did upgrade TypeScript within Angular-Slickgrid itself and everything seems fine. Give it a try.

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.