HalitTalha / ng-material-extensions

Extended features for @angular/material components
Apache License 2.0
101 stars 52 forks source link

Support for Angular Material v15 #171

Closed AndresCarvalloABM closed 1 year ago

AndresCarvalloABM commented 1 year ago

Hello

Today, I have finished updating the project from Angular v14 to v15, along with Angular Material to v15. Once I try to run the application, I get the following error for cdk-table-exporter

Error: node_modules/cdk-table-exporter/lib/services/exporters/file-exporter.d.ts:3:67 - error TS2344: Type 'T' does not satisfy the constraint 'Options'.

3 export declare abstract class FileExporter<T> implements Exporter<T> {
                                                                    ~

  node_modules/cdk-table-exporter/lib/services/exporters/file-exporter.d.ts:3:44
    3 export declare abstract class FileExporter<T> implements Exporter<T> {
                                                 ~
    This type parameter might need an `extends Options` constraint.
image

I managed to compile the project using "skipLibCheck": true into tsconfig.json but once I'm about to export as a CSV file, I run into this error

image

ianDGM commented 1 year ago

Experiencing the same Issue. Commenting to help visibility.

ludovicoloreti commented 1 year ago

same issue here.

ianDGM commented 1 year ago

So I was able to get my application running locally by adding this to file-exporter.d.ts

import { Options } from '../../options';

and then editing the class declaration to say:

export declare abstract class FileExporter<T extends Options> implements Exporter<T> {

But this is changing the node_modules and not sure how viable that is.

ludovicoloreti commented 1 year ago

So I was able to get my application running locally by adding this to file-exporter.d.ts

import { Options } from '../../options';

and then editing the class declaration to say:

export declare abstract class FileExporter<T extends Options> implements Exporter<T> {

But this is changing the node_modules and not sure how viable that is.

Can you fork it with the code changes? In this way it will be possible for everybody to install that version via npm i

EDIT: Seeing old in comments the author saying "pull requests" are kindly welcome

ianDGM commented 1 year ago

Yes, I should have some time this afternoon to do it.

ianDGM commented 1 year ago

So I was able to get my application running locally by adding this to file-exporter.d.ts import { Options } from '../../options'; and then editing the class declaration to say: export declare abstract class FileExporter<T extends Options> implements Exporter<T> { But this is changing the node_modules and not sure how viable that is.

Can you fork it with the code changes? In this way it will be possible for everybody to install that version via npm i

EDIT: Seeing old in comments the author saying "pull requests" are kindly welcome

seems like someone has already made a pull request here. https://github.com/HalitTalha/ng-material-extensions/pull/158/commits

joerggross commented 1 year ago

We run into the same problems using Angular 15. Is there any update/progress on this issue?

shajeermhmmd commented 1 year ago

We are also facing the same issue... is there any solution?

HalitTalha commented 1 year ago

Hi there, Since this would require a full rebuild of the Angular workspace with newer versions, it's taking time. But I hope I'll be able to handle it soon. If anyone could have done it before (upgraded the workspace and projects into v15) that would be great to have this as a PR.