question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Operator '+' cannot be applied to types 'number' and 'boolean'

See original GitHub issue

Hi,

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:open
  • Created 5 years ago
  • Reactions:3
  • Comments:12

github_iconTop GitHub Comments

1reaction
csimpfcommented, Aug 20, 2020

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!

1reaction
jim060commented, Jan 31, 2019

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 😃

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found