readme files

This commit is contained in:
Primakov Alexandr Alexandrovich
2024-11-15 18:47:32 +03:00
parent 6b64d09397
commit 1d2802f113
17 changed files with 107 additions and 49 deletions

3
06_complex/Readme.md Normal file
View File

@@ -0,0 +1,3 @@
# Разберите приведённые примеры
> обратите внимание как применяется infer

View File

@@ -14,4 +14,4 @@ const double = (x: number, s: 'foo') => x * 2;
// get type of first argument of function
type GetFirstFuncArg<Arg> = Arg extends (a, x: infer T) => any ? T : never;
type DoubleArgType = GetFirstFuncArg<typeof double>
type DoubleArgType = GetFirstFuncArg<typeof double>