| [a762898] | 1 | /**
|
|---|
| 2 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 3 | *
|
|---|
| 4 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 5 | *
|
|---|
| 6 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 7 | *
|
|---|
| 8 | * @template R The return type of the function.
|
|---|
| 9 | * @param {() => R} func The function to invoke.
|
|---|
| 10 | * @returns {() => R} Returns the new function.
|
|---|
| 11 | * @example
|
|---|
| 12 | * const getValue = () => 42;
|
|---|
| 13 | * const getValueFunc = partialRight(getValue);
|
|---|
| 14 | * console.log(getValueFunc()); // => 42
|
|---|
| 15 | */
|
|---|
| 16 | declare function partialRight<R>(func: () => R): () => R;
|
|---|
| 17 | /**
|
|---|
| 18 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 19 | *
|
|---|
| 20 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 21 | *
|
|---|
| 22 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 23 | *
|
|---|
| 24 | * @template T1 The type of the first argument.
|
|---|
| 25 | * @template R The return type of the function.
|
|---|
| 26 | * @param {(arg1: T1) => R} func The function to partially apply arguments to.
|
|---|
| 27 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 28 | * @returns {() => R} Returns the new partially applied function.
|
|---|
| 29 | * @example
|
|---|
| 30 | * const addOne = (num: number) => num + 1;
|
|---|
| 31 | * const addOneFunc = partialRight(addOne, 1);
|
|---|
| 32 | * console.log(addOneFunc()); // => 2
|
|---|
| 33 | */
|
|---|
| 34 | declare function partialRight<T1, R>(func: (arg1: T1) => R, arg1: T1): () => R;
|
|---|
| 35 | /**
|
|---|
| 36 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 37 | *
|
|---|
| 38 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 39 | *
|
|---|
| 40 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 41 | *
|
|---|
| 42 | * @template T1 The type of the first argument.
|
|---|
| 43 | * @template R The return type of the function.
|
|---|
| 44 | * @param {(arg1: T1) => R} func The function to partially apply arguments to.
|
|---|
| 45 | * @returns {(arg1: T1) => R} Returns the new partially applied function.
|
|---|
| 46 | * @example
|
|---|
| 47 | * const multiplyBy = (factor: number) => (num: number) => num * factor;
|
|---|
| 48 | * const double = partialRight(multiplyBy(2));
|
|---|
| 49 | * console.log(double(5)); // => 10
|
|---|
| 50 | */
|
|---|
| 51 | declare function partialRight<T1, R>(func: (arg1: T1) => R): (arg1: T1) => R;
|
|---|
| 52 | /**
|
|---|
| 53 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 54 | *
|
|---|
| 55 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 56 | *
|
|---|
| 57 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 58 | *
|
|---|
| 59 | * @template T1 The type of the first argument.
|
|---|
| 60 | * @template R The return type of the function.
|
|---|
| 61 | * @param {(arg1: T1) => R} func The function to partially apply arguments to.
|
|---|
| 62 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 63 | * @returns {() => R} Returns the new partially applied function.
|
|---|
| 64 | * @example
|
|---|
| 65 | * const greet = (name: string) => `Hello, ${name}!`;
|
|---|
| 66 | * const greetJohn = partialRight(greet, 'John');
|
|---|
| 67 | * console.log(greetJohn()); // => 'Hello, John!'
|
|---|
| 68 | */
|
|---|
| 69 | declare function partialRight<T1, R>(func: (arg1: T1) => R, arg1: T1): () => R;
|
|---|
| 70 | /**
|
|---|
| 71 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 72 | *
|
|---|
| 73 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 74 | *
|
|---|
| 75 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 76 | *
|
|---|
| 77 | * @template T1 The type of the first argument.
|
|---|
| 78 | * @template T2 The type of the second argument.
|
|---|
| 79 | * @template R The return type of the function.
|
|---|
| 80 | * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.
|
|---|
| 81 | * @returns {(arg1: T1, arg2: T2) => R} Returns the new partially applied function.
|
|---|
| 82 | * @example
|
|---|
| 83 | * const subtract = (a: number, b: number) => a - b;
|
|---|
| 84 | * const subtractFive = partialRight(subtract);
|
|---|
| 85 | * console.log(subtractFive(10, 5)); // => 5
|
|---|
| 86 | */
|
|---|
| 87 | declare function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R): (arg1: T1, arg2: T2) => R;
|
|---|
| 88 | /**
|
|---|
| 89 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 90 | *
|
|---|
| 91 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 92 | *
|
|---|
| 93 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 94 | *
|
|---|
| 95 | * @template T1 The type of the first argument.
|
|---|
| 96 | * @template T2 The type of the second argument.
|
|---|
| 97 | * @template R The return type of the function.
|
|---|
| 98 | * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.
|
|---|
| 99 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 100 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 101 | * @returns {(arg2: T2) => R} Returns the new partially applied function.
|
|---|
| 102 | * @example
|
|---|
| 103 | * const concat = (a: string, b: string) => a + b;
|
|---|
| 104 | * const concatWithHello = partialRight(concat, 'Hello', partialRight.placeholder);
|
|---|
| 105 | * console.log(concatWithHello(' World!')); // => 'Hello World!'
|
|---|
| 106 | */
|
|---|
| 107 | declare function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg1: T1, arg2: Placeholder): (arg2: T2) => R;
|
|---|
| 108 | /**
|
|---|
| 109 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 110 | *
|
|---|
| 111 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 112 | *
|
|---|
| 113 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 114 | *
|
|---|
| 115 | * @template T1 The type of the first argument.
|
|---|
| 116 | * @template T2 The type of the second argument.
|
|---|
| 117 | * @template R The return type of the function.
|
|---|
| 118 | * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.
|
|---|
| 119 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 120 | * @returns {(arg1: T1) => R} Returns the new partially applied function.
|
|---|
| 121 | * @example
|
|---|
| 122 | * const divide = (a: number, b: number) => a / b;
|
|---|
| 123 | * const divideByTwo = partialRight(divide, 2);
|
|---|
| 124 | * console.log(divideByTwo(10)); // => 5
|
|---|
| 125 | */
|
|---|
| 126 | declare function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg2: T2): (arg1: T1) => R;
|
|---|
| 127 | /**
|
|---|
| 128 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 129 | *
|
|---|
| 130 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 131 | *
|
|---|
| 132 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 133 | *
|
|---|
| 134 | * @template T1 The type of the first argument.
|
|---|
| 135 | * @template T2 The type of the second argument.
|
|---|
| 136 | * @template R The return type of the function.
|
|---|
| 137 | * @param {(arg1: T1, arg2: T2) => R} func The function to partially apply arguments to.
|
|---|
| 138 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 139 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 140 | * @returns {() => R} Returns the new partially applied function.
|
|---|
| 141 | * @example
|
|---|
| 142 | * const multiply = (a: number, b: number) => a * b;
|
|---|
| 143 | * const multiplyByThreeAndFour = partialRight(multiply, 3, 4);
|
|---|
| 144 | * console.log(multiplyByThreeAndFour()); // => 12
|
|---|
| 145 | */
|
|---|
| 146 | declare function partialRight<T1, T2, R>(func: (arg1: T1, arg2: T2) => R, arg1: T1, arg2: T2): () => R;
|
|---|
| 147 | /**
|
|---|
| 148 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 149 | *
|
|---|
| 150 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 151 | *
|
|---|
| 152 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 153 | *
|
|---|
| 154 | * @template T1 The type of the first argument.
|
|---|
| 155 | * @template T2 The type of the second argument.
|
|---|
| 156 | * @template T3 The type of the third argument.
|
|---|
| 157 | * @template R The return type of the function.
|
|---|
| 158 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 159 | * @returns {(arg1: T1, arg2: T2, arg3: T3) => R} Returns the new partially applied function.
|
|---|
| 160 | * @example
|
|---|
| 161 | * const sumThree = (a: number, b: number, c: number) => a + b + c;
|
|---|
| 162 | * const sumWithFive = partialRight(sumThree);
|
|---|
| 163 | * console.log(sumWithFive(1, 2, 5)); // => 8
|
|---|
| 164 | */
|
|---|
| 165 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R): (arg1: T1, arg2: T2, arg3: T3) => R;
|
|---|
| 166 | /**
|
|---|
| 167 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 168 | *
|
|---|
| 169 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 170 | *
|
|---|
| 171 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 172 | *
|
|---|
| 173 | * @template T1 The type of the first argument.
|
|---|
| 174 | * @template T2 The type of the second argument.
|
|---|
| 175 | * @template T3 The type of the third argument.
|
|---|
| 176 | * @template R The return type of the function.
|
|---|
| 177 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 178 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 179 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 180 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 181 | * @returns {(arg2: T2, arg3: T3) => R} Returns the new partially applied function.
|
|---|
| 182 | * @example
|
|---|
| 183 | * const formatDate = (day: number, month: number, year: number) => `${day}/${month}/${year}`;
|
|---|
| 184 | * const formatDateWithDay = partialRight(formatDate, 1, partialRight.placeholder, partialRight.placeholder);
|
|---|
| 185 | * console.log(formatDateWithDay(12, 2023)); // => '1/12/2023'
|
|---|
| 186 | */
|
|---|
| 187 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: Placeholder, arg3: Placeholder): (arg2: T2, arg3: T3) => R;
|
|---|
| 188 | /**
|
|---|
| 189 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 190 | *
|
|---|
| 191 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 192 | *
|
|---|
| 193 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 194 | *
|
|---|
| 195 | * @template T1 The type of the first argument.
|
|---|
| 196 | * @template T2 The type of the second argument.
|
|---|
| 197 | * @template T3 The type of the third argument.
|
|---|
| 198 | * @template R The return type of the function.
|
|---|
| 199 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 200 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 201 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 202 | * @returns {(arg1: T1, arg3: T3) => R} Returns the new partially applied function.
|
|---|
| 203 | * @example
|
|---|
| 204 | * const createUser = (name: string, age: number, country: string) => `${name}, ${age} years old from ${country}`;
|
|---|
| 205 | * const createUserFromUSA = partialRight(createUser, 'USA', partialRight.placeholder);
|
|---|
| 206 | * console.log(createUserFromUSA('John', 30)); // => 'John, 30 years old from USA'
|
|---|
| 207 | */
|
|---|
| 208 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: Placeholder): (arg1: T1, arg3: T3) => R;
|
|---|
| 209 | /**
|
|---|
| 210 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 211 | *
|
|---|
| 212 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 213 | *
|
|---|
| 214 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 215 | *
|
|---|
| 216 | * @template T1 The type of the first argument.
|
|---|
| 217 | * @template T2 The type of the second argument.
|
|---|
| 218 | * @template T3 The type of the third argument.
|
|---|
| 219 | * @template R The return type of the function.
|
|---|
| 220 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 221 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 222 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 223 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 224 | * @returns {(arg3: T3) => R} Returns the new partially applied function.
|
|---|
| 225 | * @example
|
|---|
| 226 | * const logMessage = (level: string, message: string, timestamp: string) => `[${level}] ${message} at ${timestamp}`;
|
|---|
| 227 | * const logError = partialRight(logMessage, 'ERROR', '2023-10-01');
|
|---|
| 228 | * console.log(logError('Something went wrong!')); // => '[ERROR] Something went wrong! at 2023-10-01'
|
|---|
| 229 | */
|
|---|
| 230 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: T2, arg3: Placeholder): (arg3: T3) => R;
|
|---|
| 231 | /**
|
|---|
| 232 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 233 | *
|
|---|
| 234 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 235 | *
|
|---|
| 236 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 237 | *
|
|---|
| 238 | * @template T1 The type of the first argument.
|
|---|
| 239 | * @template T2 The type of the second argument.
|
|---|
| 240 | * @template T3 The type of the third argument.
|
|---|
| 241 | * @template R The return type of the function.
|
|---|
| 242 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 243 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 244 | * @returns {(arg1: T1, arg2: T2) => R} Returns the new partially applied function.
|
|---|
| 245 | * @example
|
|---|
| 246 | * const calculateArea = (length: number, width: number) => length * width;
|
|---|
| 247 | * const calculateAreaWithWidth = partialRight(calculateArea, 5);
|
|---|
| 248 | * console.log(calculateAreaWithWidth(10)); // => 50
|
|---|
| 249 | */
|
|---|
| 250 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg3: T3): (arg1: T1, arg2: T2) => R;
|
|---|
| 251 | /**
|
|---|
| 252 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 253 | *
|
|---|
| 254 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 255 | *
|
|---|
| 256 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 257 | *
|
|---|
| 258 | * @template T1 The type of the first argument.
|
|---|
| 259 | * @template T2 The type of the second argument.
|
|---|
| 260 | * @template T3 The type of the third argument.
|
|---|
| 261 | * @template R The return type of the function.
|
|---|
| 262 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 263 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 264 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 265 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 266 | * @returns {(arg2: T2) => R} Returns the new partially applied function.
|
|---|
| 267 | * @example
|
|---|
| 268 | * const formatCurrency = (amount: number, currency: string) => `${amount} ${currency}`;
|
|---|
| 269 | * const formatUSD = partialRight(formatCurrency, 100, partialRight.placeholder);
|
|---|
| 270 | * console.log(formatUSD('USD')); // => '100 USD'
|
|---|
| 271 | */
|
|---|
| 272 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: Placeholder, arg3: T3): (arg2: T2) => R;
|
|---|
| 273 | /**
|
|---|
| 274 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 275 | *
|
|---|
| 276 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 277 | *
|
|---|
| 278 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 279 | *
|
|---|
| 280 | * @template T1 The type of the first argument.
|
|---|
| 281 | * @template T2 The type of the second argument.
|
|---|
| 282 | * @template T3 The type of the third argument.
|
|---|
| 283 | * @template R The return type of the function.
|
|---|
| 284 | * @param {(arg1: T1, arg2: T2, arg3: T3) => R} func The function to partially apply arguments to.
|
|---|
| 285 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 286 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 287 | * @returns {(arg1: T1) => R} Returns the new partially applied function.
|
|---|
| 288 | * @example
|
|---|
| 289 | * const createProfile = (name: string, age: number, country: string) => `${name}, ${age} from ${country}`;
|
|---|
| 290 | * const createProfileFromCanada = partialRight(createProfile, 'Canada', 'John');
|
|---|
| 291 | * console.log(createProfileFromCanada(30)); // => 'John, 30 from Canada'
|
|---|
| 292 | */
|
|---|
| 293 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg2: T2, arg3: T3): (arg1: T1) => R;
|
|---|
| 294 | declare function partialRight<T1, T2, T3, R>(func: (arg1: T1, arg2: T2, arg3: T3) => R, arg1: T1, arg2: T2, arg3: T3): () => R;
|
|---|
| 295 | /**
|
|---|
| 296 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 297 | *
|
|---|
| 298 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 299 | *
|
|---|
| 300 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 301 | *
|
|---|
| 302 | * @template T1 The type of the first argument.
|
|---|
| 303 | * @template T2 The type of the second argument.
|
|---|
| 304 | * @template T3 The type of the third argument.
|
|---|
| 305 | * @template T4 The type of the fourth argument.
|
|---|
| 306 | * @template R The return type of the function.
|
|---|
| 307 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 308 | * @returns {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} Returns a new function that takes four arguments.
|
|---|
| 309 | */
|
|---|
| 310 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R): (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R;
|
|---|
| 311 | /**
|
|---|
| 312 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 313 | *
|
|---|
| 314 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 315 | *
|
|---|
| 316 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 317 | *
|
|---|
| 318 | * @template T1 The type of the first argument.
|
|---|
| 319 | * @template T2 The type of the second argument.
|
|---|
| 320 | * @template T3 The type of the third argument.
|
|---|
| 321 | * @template T4 The type of the fourth argument.
|
|---|
| 322 | * @template R The return type of the function.
|
|---|
| 323 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 324 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 325 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 326 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 327 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 328 | * @returns {(arg2: T2, arg3: T3, arg4: T4) => R} Returns a new function that takes the second, third, and fourth arguments.
|
|---|
| 329 | */
|
|---|
| 330 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: Placeholder, arg3: Placeholder, arg4: Placeholder): (arg2: T2, arg3: T3, arg4: T4) => R;
|
|---|
| 331 | /**
|
|---|
| 332 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 333 | *
|
|---|
| 334 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 335 | *
|
|---|
| 336 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 337 | *
|
|---|
| 338 | * @template T1 The type of the first argument.
|
|---|
| 339 | * @template T2 The type of the second argument.
|
|---|
| 340 | * @template T3 The type of the third argument.
|
|---|
| 341 | * @template T4 The type of the fourth argument.
|
|---|
| 342 | * @template R The return type of the function.
|
|---|
| 343 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 344 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 345 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 346 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 347 | * @returns {(arg1: T1, arg3: T3, arg4: T4) => R} Returns a new function that takes the first, third, and fourth arguments.
|
|---|
| 348 | */
|
|---|
| 349 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg2: T2, arg3: Placeholder, arg4: Placeholder): (arg1: T1, arg3: T3, arg4: T4) => R;
|
|---|
| 350 | /**
|
|---|
| 351 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 352 | *
|
|---|
| 353 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 354 | *
|
|---|
| 355 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 356 | *
|
|---|
| 357 | * @template T1 The type of the first argument.
|
|---|
| 358 | * @template T2 The type of the second argument.
|
|---|
| 359 | * @template T3 The type of the third argument.
|
|---|
| 360 | * @template T4 The type of the fourth argument.
|
|---|
| 361 | * @template R The return type of the function.
|
|---|
| 362 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 363 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 364 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 365 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 366 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 367 | * @returns {(arg3: T3, arg4: T4) => R} Returns a new function that takes the third and fourth arguments.
|
|---|
| 368 | */
|
|---|
| 369 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: T2, arg3: Placeholder, arg4: Placeholder): (arg3: T3, arg4: T4) => R;
|
|---|
| 370 | /**
|
|---|
| 371 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 372 | *
|
|---|
| 373 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 374 | *
|
|---|
| 375 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 376 | *
|
|---|
| 377 | * @template T1 The type of the first argument.
|
|---|
| 378 | * @template T2 The type of the second argument.
|
|---|
| 379 | * @template T3 The type of the third argument.
|
|---|
| 380 | * @template T4 The type of the fourth argument.
|
|---|
| 381 | * @template R The return type of the function.
|
|---|
| 382 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 383 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 384 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 385 | * @returns {(arg1: T1, arg2: T2, arg4: T4) => R} Returns a new function that takes the first, second, and fourth arguments.
|
|---|
| 386 | */
|
|---|
| 387 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg3: T3, arg4: Placeholder): (arg1: T1, arg2: T2, arg4: T4) => R;
|
|---|
| 388 | /**
|
|---|
| 389 | * Creates a function that invokes `func` with the first argument, a placeholder for the second argument,
|
|---|
| 390 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 391 | *
|
|---|
| 392 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 393 | *
|
|---|
| 394 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 395 | *
|
|---|
| 396 | * @template T1 The type of the first argument.
|
|---|
| 397 | * @template T2 The type of the second argument.
|
|---|
| 398 | * @template T3 The type of the third argument.
|
|---|
| 399 | * @template T4 The type of the fourth argument.
|
|---|
| 400 | * @template R The return type of the function.
|
|---|
| 401 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 402 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 403 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 404 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 405 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 406 | * @returns {(arg2: T2, arg4: T4) => R} Returns a new function that takes the second and fourth arguments.
|
|---|
| 407 | */
|
|---|
| 408 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: Placeholder, arg3: T3, arg4: Placeholder): (arg2: T2, arg4: T4) => R;
|
|---|
| 409 | /**
|
|---|
| 410 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 411 | *
|
|---|
| 412 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 413 | *
|
|---|
| 414 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 415 | *
|
|---|
| 416 | * @template T1 The type of the first argument.
|
|---|
| 417 | * @template T2 The type of the second argument.
|
|---|
| 418 | * @template T3 The type of the third argument.
|
|---|
| 419 | * @template T4 The type of the fourth argument.
|
|---|
| 420 | * @template R The return type of the function.
|
|---|
| 421 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 422 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 423 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 424 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 425 | * @returns {(arg1: T1, arg4: T4) => R} Returns a new function that takes the first and fourth arguments.
|
|---|
| 426 | */
|
|---|
| 427 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg2: T2, arg3: T3, arg4: Placeholder): (arg1: T1, arg4: T4) => R;
|
|---|
| 428 | /**
|
|---|
| 429 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 430 | *
|
|---|
| 431 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 432 | *
|
|---|
| 433 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 434 | *
|
|---|
| 435 | * @template T1 The type of the first argument.
|
|---|
| 436 | * @template T2 The type of the second argument.
|
|---|
| 437 | * @template T3 The type of the third argument.
|
|---|
| 438 | * @template T4 The type of the fourth argument.
|
|---|
| 439 | * @template R The return type of the function.
|
|---|
| 440 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 441 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 442 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 443 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 444 | * @param {Placeholder} arg4 The placeholder for the fourth argument.
|
|---|
| 445 | * @returns {(arg4: T4) => R} Returns a new function that takes the fourth argument.
|
|---|
| 446 | */
|
|---|
| 447 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: T2, arg3: T3, arg4: Placeholder): (arg4: T4) => R;
|
|---|
| 448 | /**
|
|---|
| 449 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 450 | *
|
|---|
| 451 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 452 | *
|
|---|
| 453 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 454 | *
|
|---|
| 455 | * @template T1 The type of the first argument.
|
|---|
| 456 | * @template T2 The type of the second argument.
|
|---|
| 457 | * @template T3 The type of the third argument.
|
|---|
| 458 | * @template T4 The type of the fourth argument.
|
|---|
| 459 | * @template R The return type of the function.
|
|---|
| 460 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 461 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 462 | * @returns {(arg1: T1, arg2: T2, arg3: T3) => R} Returns a new function that takes the first, second, and third arguments.
|
|---|
| 463 | */
|
|---|
| 464 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg4: T4): (arg1: T1, arg2: T2, arg3: T3) => R;
|
|---|
| 465 | /**
|
|---|
| 466 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 467 | *
|
|---|
| 468 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 469 | *
|
|---|
| 470 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 471 | *
|
|---|
| 472 | * @template T1 The type of the first argument.
|
|---|
| 473 | * @template T2 The type of the second argument.
|
|---|
| 474 | * @template T3 The type of the third argument.
|
|---|
| 475 | * @template T4 The type of the fourth argument.
|
|---|
| 476 | * @template R The return type of the function.
|
|---|
| 477 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 478 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 479 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 480 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 481 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 482 | * @returns {(arg2: T2, arg3: T3) => R} Returns a new function that takes the second and third arguments.
|
|---|
| 483 | */
|
|---|
| 484 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: Placeholder, arg3: Placeholder, arg4: T4): (arg2: T2, arg3: T3) => R;
|
|---|
| 485 | /**
|
|---|
| 486 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 487 | *
|
|---|
| 488 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 489 | *
|
|---|
| 490 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 491 | *
|
|---|
| 492 | * @template T1 The type of the first argument.
|
|---|
| 493 | * @template T2 The type of the second argument.
|
|---|
| 494 | * @template T3 The type of the third argument.
|
|---|
| 495 | * @template T4 The type of the fourth argument.
|
|---|
| 496 | * @template R The return type of the function.
|
|---|
| 497 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 498 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 499 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 500 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 501 | * @returns {(arg1: T1, arg3: T3) => R} Returns a new function that takes the first and third arguments.
|
|---|
| 502 | */
|
|---|
| 503 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg2: T2, arg3: Placeholder, arg4: T4): (arg1: T1, arg3: T3) => R;
|
|---|
| 504 | /**
|
|---|
| 505 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 506 | *
|
|---|
| 507 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 508 | *
|
|---|
| 509 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 510 | *
|
|---|
| 511 | * @template T1 The type of the first argument.
|
|---|
| 512 | * @template T2 The type of the second argument.
|
|---|
| 513 | * @template T3 The type of the third argument.
|
|---|
| 514 | * @template T4 The type of the fourth argument.
|
|---|
| 515 | * @template R The return type of the function.
|
|---|
| 516 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 517 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 518 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 519 | * @param {Placeholder} arg3 The placeholder for the third argument.
|
|---|
| 520 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 521 | * @returns {(arg3: T3) => R} Returns a new function that takes the third argument.
|
|---|
| 522 | */
|
|---|
| 523 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: T2, arg3: Placeholder, arg4: T4): (arg3: T3) => R;
|
|---|
| 524 | /**
|
|---|
| 525 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 526 | *
|
|---|
| 527 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 528 | *
|
|---|
| 529 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 530 | *
|
|---|
| 531 | * @template T1 The type of the first argument.
|
|---|
| 532 | * @template T2 The type of the second argument.
|
|---|
| 533 | * @template T3 The type of the third argument.
|
|---|
| 534 | * @template T4 The type of the fourth argument.
|
|---|
| 535 | * @template R The return type of the function.
|
|---|
| 536 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 537 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 538 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 539 | * @returns {(arg1: T1, arg2: T2) => R} Returns a new function that takes the first and second arguments.
|
|---|
| 540 | */
|
|---|
| 541 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg3: T3, arg4: T4): (arg1: T1, arg2: T2) => R;
|
|---|
| 542 | /**
|
|---|
| 543 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 544 | *
|
|---|
| 545 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 546 | *
|
|---|
| 547 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 548 | *
|
|---|
| 549 | * @template T1 The type of the first argument.
|
|---|
| 550 | * @template T2 The type of the second argument.
|
|---|
| 551 | * @template T3 The type of the third argument.
|
|---|
| 552 | * @template T4 The type of the fourth argument.
|
|---|
| 553 | * @template R The return type of the function.
|
|---|
| 554 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 555 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 556 | * @param {Placeholder} arg2 The placeholder for the second argument.
|
|---|
| 557 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 558 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 559 | * @returns {(arg2: T2) => R} Returns a new function that takes the second argument.
|
|---|
| 560 | */
|
|---|
| 561 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: Placeholder, arg3: T3, arg4: T4): (arg2: T2) => R;
|
|---|
| 562 | /**
|
|---|
| 563 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 564 | *
|
|---|
| 565 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 566 | *
|
|---|
| 567 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 568 | *
|
|---|
| 569 | * @template T1 The type of the first argument.
|
|---|
| 570 | * @template T2 The type of the second argument.
|
|---|
| 571 | * @template T3 The type of the third argument.
|
|---|
| 572 | * @template T4 The type of the fourth argument.
|
|---|
| 573 | * @template R The return type of the function.
|
|---|
| 574 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 575 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 576 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 577 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 578 | * @returns {(arg1: T1) => R} Returns a new function that takes the first argument.
|
|---|
| 579 | */
|
|---|
| 580 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg2: T2, arg3: T3, arg4: T4): (arg1: T1) => R;
|
|---|
| 581 | /**
|
|---|
| 582 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 583 | *
|
|---|
| 584 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 585 | *
|
|---|
| 586 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 587 | *
|
|---|
| 588 | * @template T1 The type of the first argument.
|
|---|
| 589 | * @template T2 The type of the second argument.
|
|---|
| 590 | * @template T3 The type of the third argument.
|
|---|
| 591 | * @template T4 The type of the fourth argument.
|
|---|
| 592 | * @template R The return type of the function.
|
|---|
| 593 | * @param {(arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R} func The function to partially apply arguments to.
|
|---|
| 594 | * @param {T1} arg1 The first argument to be partially applied.
|
|---|
| 595 | * @param {T2} arg2 The second argument to be partially applied.
|
|---|
| 596 | * @param {T3} arg3 The third argument to be partially applied.
|
|---|
| 597 | * @param {T4} arg4 The fourth argument to be partially applied.
|
|---|
| 598 | * @returns {() => R} Returns the new partially applied function.
|
|---|
| 599 | * @example
|
|---|
| 600 | * const concatenate = (a: string, b: string, c: string, d: string) => a + b + c + d;
|
|---|
| 601 | * const concatenateHelloWorld = partialRight(concatenate, 'Hello', ' ', 'World', '!');
|
|---|
| 602 | * console.log(concatenateHelloWorld()); // => 'Hello World!'
|
|---|
| 603 | */
|
|---|
| 604 | declare function partialRight<T1, T2, T3, T4, R>(func: (arg1: T1, arg2: T2, arg3: T3, arg4: T4) => R, arg1: T1, arg2: T2, arg3: T3, arg4: T4): () => R;
|
|---|
| 605 | /**
|
|---|
| 606 | * This method is like `partial` except that partially applied arguments are appended to the arguments it receives.
|
|---|
| 607 | *
|
|---|
| 608 | * The partialRight.placeholder value, which defaults to a `symbol`, may be used as a placeholder for partially applied arguments.
|
|---|
| 609 | *
|
|---|
| 610 | * Note: This method doesn't set the `length` property of partially applied functions.
|
|---|
| 611 | *
|
|---|
| 612 | * @template F The type of the function to partially apply.
|
|---|
| 613 | * @param {F} func The function to partially apply arguments to.
|
|---|
| 614 | * @param {...any[]} args The arguments to be partially applied.
|
|---|
| 615 | * @returns {function(...args: any[]): ReturnType<F>} Returns the new partially applied function.
|
|---|
| 616 | * @example
|
|---|
| 617 | * const log = (...messages: string[]) => console.log(...messages);
|
|---|
| 618 | * const logError = partialRight(log, 'Error:');
|
|---|
| 619 | * logError('Something went wrong!'); // => 'Error: Something went wrong!'
|
|---|
| 620 | */
|
|---|
| 621 | declare function partialRight(func: (...args: any[]) => any, ...args: any[]): (...args: any[]) => any;
|
|---|
| 622 | declare namespace partialRight {
|
|---|
| 623 | var placeholder: typeof placeholderSymbol;
|
|---|
| 624 | }
|
|---|
| 625 | declare const placeholderSymbol: unique symbol;
|
|---|
| 626 | type Placeholder = typeof placeholderSymbol;
|
|---|
| 627 |
|
|---|
| 628 | export { partialRight };
|
|---|