Skip to content
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

Fix function overloads lesson #109

Merged
merged 2 commits into from Jan 7, 2023

Conversation

tysky
Copy link
Contributor

@tysky tysky commented Jan 6, 2023

При использовании типа unknown в примере typescript ругается

Property 'toFixed' does not exist on type 'unknown'.

Мне кажется, что можно вернуть тип any для перегрузки функции. Да и в доке typescript тоже есть примеры с any для перегрузки функции.
Аналогично поправил типы в другом примере.
Также поправил аналогичный пример из урока про Narrowing

@bondiano bondiano merged commit 9ca833f into hexlet-basics:main Jan 7, 2023
@tysky tysky deleted the fix-function-overloads branch January 7, 2023 14:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants