Skip to content

Commit 4f26e6a

Browse files
committed
Рефакторинг РУ
Исправлен тип возвращаемого из функции массива, синтаксис описания массива изменен в соответствии с описанием урока.
1 parent 0ff3d6d commit 4f26e6a

File tree

1 file changed

+1
-1
lines changed
  • modules/22-arrays/20-type-annotations

1 file changed

+1
-1
lines changed

modules/22-arrays/20-type-annotations/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// BEGIN
2-
function compact(items: Array<number | null>): Array<number | null> {
2+
function compact(items: (number | null)[]): number[] {
33
return items.filter((item) => item !== null);
44
}
55
// END

0 commit comments

Comments
 (0)