diff --git a/modules/20-functions/85-function-overloads/description.ru.yml b/modules/20-functions/85-function-overloads/description.ru.yml index 56973aea..c95682a3 100644 --- a/modules/20-functions/85-function-overloads/description.ru.yml +++ b/modules/20-functions/85-function-overloads/description.ru.yml @@ -33,11 +33,13 @@ theory: | const concat: { (a: number, b: number): string; (a: string, b: string): string; - } = (a: unknown, b: unknown) => ( - typeof a === 'string' - ? `${a}${b}` - : `${a.toFixed()}${b.toFixed()}` - ) + } = (a: unknown, b: unknown) => { + if (typeof a === 'number') { + return `${a.toFixed()}${b.toFixed()}`; + } + + return `${a}${b}`; + } // с использованием алиасов type Overloaded = {