Skip to content

Добавлен синтаксис для стрелочных функций #114

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

Closed
wants to merge 0 commits into from

Conversation

v1valasvegan
Copy link
Contributor

Добавлен синтаксис для стрелочных функций, конструкция if/else заменена на тернарник

@@ -10,11 +10,9 @@ theory: |
function concat(a: string, b: string): string;

function concat(a: any, b: any): string {
if (typeof a === 'string') {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

тут оставить if и убрать else блок, как сделано в большинстве других мест на хекслете

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

поправил этот момент, спулься, давай в ПРе оставим полезную информацию о перегрузке в стрелочных функциях через перегрузку внутри объектного литерала

@bondiano
Copy link
Collaborator

bondiano commented Jan 8, 2023

Хорошее дополнение урока, к сожелению, функционал typescript для вывода типов не работает с перегрузками, вот issue про это microsoft/TypeScript#22609. Давай оставим такое решение

@bondiano
Copy link
Collaborator

bondiano commented Jan 8, 2023

@v1valasvegan у тебя лишние комиты в ПР затесались, видимо после пулла, поправь пожалуйста

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants