Operator '+' cannot be applied to types 'number' and 'boolean'
See original GitHub issueHi,
I have imported this angular component into a JHipster project and when I try to compile it for production I get this error:
ERROR in node_modules/ng2-smart-table/components/tbody/tbody.component.html(1,2005): : Operator ‘+’ cannot be applied to types ‘number’ and ‘boolean’. node_modules/ng2-smart-table/components/thead/cells/title/title.component.d.ts.TitleComponent.html(3,17): : Expected 1 arguments, but got 2.
Also, the new angular does not like the keyword /deep/
in the CSS / SCSS file and it would be better to change with ::ng-deep
Issue Analytics
- State:
- Created 5 years ago
- Reactions:3
- Comments:12
Top Results From Across the Web
Operator '+' cannot be applied to types 'Number' and '1'
Try adding the unary operator + like this => CurrentPage: +this.paging.PageIndex + 1, and see if it works. – David R. Nov 25,...
Read more >error TS2365: Operator '+' cannot be applied to types 'Number ...
The compiler is complaining about Operator '+' cannot be applied to types 'MyNumber' and 'MyNumber' but it works as before the operator is ......
Read more >Why "Operator '+' cannot be applied to types 'string | number'"?
Operations are evaluated according to the types of their operands, not their identities. The left-hand type is string | number, the right-hand ...
Read more >Operator '>' cannot be applied to types 'boolean' and ... - Qiita
Operator '>' cannot be applied to types 'boolean' and 'number'.って言われた時. sell. JavaScript,TypeScript,Angular.
Read more >Operator '+' cannot be applied to types 'Number' and '1'
Don't ever use the types Number , String , Boolean , or Object . These types refer to non-primitive boxed objects that are...
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
Hi all, just putting this here in case it helps anybody else. I wanted to fix this without forking another user’s repo; so I used patch-package. It sort of locks me into the version of ng2-smart-table I was using, but I was okay with that. I followed the changes in https://github.com/Sebi11/ng2-smart-table/commit/5b6fc41 (didn’t need to edit the scss files). Solved everything for me, and now I can use type checking!
Thank you for your help. I created my custom package on https://www.npmjs.com with this commit (Sebi11@5b6fc41) and it’s work for me 😃