readme files

This commit is contained in:
Primakov Alexandr Alexandrovich committed 2024-11-15 18:51:24 +03:00
1 parent 6b64d09397
commit 1d2802f113
17 files changed
+107 -49

No files matched your search

+3
View File
@@ -0,0 +1,3 @@
# Разберите приведённые примеры
> обратите внимание как применяется infer
+1 -1
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>