In ambient enum declarations member initializer must be constant expression
See original GitHub issueWhen I import NgxDatatableModule it gives me below list of errors
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/column-mode.type.d.ts (2,16): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/column-mode.type.d.ts (3,12): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/column-mode.type.d.ts (4,13): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/sort.type.d.ts (2,14):In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/sort.type.d.ts (3,13):In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/sort-direction.type.d.ts (2,11): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/sort-direction.type.d.ts (3,12): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/selection.type.d.ts (2,14): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/selection.type.d.ts (3,13): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/selection.type.d.ts (4,18): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/selection.type.d.ts (5,12): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/selection.type.d.ts (6,16): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/click.type.d.ts (2,14): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/click.type.d.ts (3,14): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/contextmenu.type.d.ts (2,14): In ambient enum declarations member initializer must be constant expression.
ERROR in /Users/manishsharma/My Projects/AngularJS/Prateek/magnitudinis/node_modules/@swimlane/ngx-datatable/release/types/contextmenu.type.d.ts (3,12): In ambient enum declarations member initializer must be constant expression.
Issue Analytics
- State:
- Created 6 years ago
- Comments:39 (24 by maintainers)
Top Results From Across the Web
an ambient enum declarations member initializer must be ...
I can second this issue but I believe it's a TS specific error. In ambient enum declarations member initializer must be constant expression....
Read more >(TS) In 'const' enum declartions member initializer must be ...
Build:In 'const' enum declarations member initializer must be constant expression. Code with error: export declare const enum JSDocTagName { ...
Read more >an ambient enum declarations member initializer must be ...
I tried to use it with Angular CLI without AOT stuff. But I'm getting a bunch of typescript errors. Can anybody provide me...
Read more >swimlane/ngx-datatable - Gitter
... (3,12): In ambient enum declarations member initializer must be constant expression. I'm using Angular 4.4.5 and version 10.4.0 of ngx-datatable.
Read more >Ionic 3 typescript errors - SDKs - #sentry
... line: 6 [app-scripts] In ambient enum declarations member initializer must be constant expression. [app-scripts] L3: Fatal = "fatal", ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@angun33 Looks like version >= 10.0.0 only work with Angular 5. If you want to use Angular 4 with no warning from Angular cli, then you must use ngx-datatable 9.3.0 or less.
Hi @wizarrc / @jasonhjohnson / @dinvlad
I update the typescript version and using angular 4, and its working like magic for me…
Below is the tweaks I did
└── @swimlane/ngx-datatable@10.2.3
And I added both
name
andprop
attributes in column configuration, below is the snippet