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.

Force consistent use of double or triple equal/not equal in typeofs

See original GitHub issue

Reading through the source code, I find places where == or != are used for typeof, and others where === or !== are used. I believe we should choose one and stick with it. I’d be happy to open a PR for this once there is agreement on which choice should be used.

Note: looking at the produced bundles, it seems that with typeof, === is compiled to ==, and !== is compiled to !=. So, there shouldn’t really be any differences in performance and bundle size.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:1
  • Comments:13 (13 by maintainers)

github_iconTop GitHub Comments

4reactions
sventschuicommented, Nov 17, 2019

I personally have no feelings about this topic but as the minifier will convert them to ==/!= I’d use that notion directly in the code.

1reaction
andrewigginscommented, Feb 18, 2020

Oh that’s right, thanks for pointer 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

double equals vs triple equals on PrimaryGeneratedColumn
Triple Equals not working on number field (but regular double equals does) [TypeOrm Entity object] nestjs/nest#3369.
Read more >
TypeORM "OR" operator - sql - Stack Overflow
I had the same issue, but I worked around it with the QueryBuilder. ... To use OR in sub-clause , I have to...
Read more >
Select using Query Builder - typeorm - GitBook
We used createQueryBuilder("user") . But what is "user"? It's just a regular SQL alias. We use aliases everywhere, except when we work with...
Read more >
TypeORM - Amazing ORM for TypeScript and JavaScript (ES7 ...
It allows us to create a one-to-one relationship between two entities. type => Photo is a function that returns the class of the...
Read more >
Decoupling Logic with Domain Events [Guide] - Khalil Stemmler
When we've split our application not only logically, but physically as well (via microservices), it's actually impossible for us to couple two ......
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