-
Notifications
You must be signed in to change notification settings - Fork 99
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Calc refactoring #63
Calc refactoring #63
Conversation
552ce0d
to
2b4fdee
Compare
scripts/calc/engine.ts
Outdated
trigonomenticOperators, | ||
} from "./mathOperators"; | ||
|
||
const [ZERO, FIRST, SECOND, THIRD, FOURTH] = mathPriorities; | ||
const { ZERO, FIRST, SECOND, THIRD, FOURTH } = MathPrioritiesList; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
имхо, но я бы PascalCase
оставлял для типов и конструкторов
scripts/calc/engine.ts
Outdated
import { | ||
isOperator, | ||
isTrigonometricOperator, | ||
checkerMathOperatorsPriorities, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
имхо, но методы стоит глаголами называть, а не существительными
потому что глядя на имя функции вообще не ясно, что и как она делает (ну да, проверяет, но что это значит?)
is...
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
checkMathOperatorsPriorities
- так норм?
scripts/calc/helpers.ts
Outdated
return false; | ||
} | ||
|
||
if (!Array.isArray(priorities)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
может в таком случае привести к массиву и дальше по стандартной схеме ниже?
No description provided.