Comments (5)
all arguments MUST be explicitly cast
Operator ==
introduces implicit casts.
from mapsapi-codestyle.
Follow the logic:
(a) all parameters must be explicitly cast before being used in any conditions;
(b) so there must be no difference whether you use ==
or ===
in conditions, since casting is already done;
(c) why using one more =
sign?
from mapsapi-codestyle.
You guys have core disagreement here: we never cast function arguments to types declared in documentation. We may normalise the arguments (i.e., remove optionals or assign defaults to them). Other than that we rely on user follows described function contract.
Yes, it may be bad for APIs such as Maps API, but it works pretty well for us.
from mapsapi-codestyle.
You are saying that you don't use polymorphic functions. Either state this in a codestyle or provide guidance what to do in such case. Personally, I simply don't understand then why using ===
at all if you know all types at runtime (with possible exclusion for null
, since it's an object — known language bug)/
from mapsapi-codestyle.
(c) why using one more = sign?
To avoid possible error and misuse.
from mapsapi-codestyle.
Related Issues (20)
- async without await HOT 1
- Use tslint "max-line-length" rule HOT 1
- Обязательный вызов конструктора родителя в конструкторе дочернего класса HOT 1
- Codestyle for ES6 HOT 3
- Enums code style HOT 12
- Spaces around comma HOT 3
- Required space in class methods names HOT 6
- JSCS 3 support for loris preset HOT 2
- Update eslint rules HOT 3
- Clarifying object notation HOT 2
- Class properties order HOT 5
- Type assertions style
- Move react preset to separate package
- Add tslint config
- Add rule for beginning underscore for private fields HOT 1
- Mandatory return type for functions and methods HOT 3
- Identifier references in object literals HOT 7
- Template parameter naming HOT 9
- Add rule for spaces in imports HOT 2
- Ternary operator HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from mapsapi-codestyle.