mirror of
https://github.com/wassname/DefinitelyTyped.git
synced 2026-09-09 11:13:57 +08:00
(feature) Renamed _.overArgs to _.overArgs
This commit is contained in:
+14
-14
@@ -5993,8 +5993,8 @@ result = <TestMemoizedResultFn>_.memoize<TestMemoizedResultFn>(testMemoizeFn, te
|
||||
result = <TestMemoizedResultFn>(_(testMemoizeFn).memoize<TestMemoizedResultFn>().value());
|
||||
result = <TestMemoizedResultFn>(_(testMemoizeFn).memoize<TestMemoizedResultFn>(testMemoizeResolverFn).value());
|
||||
|
||||
// _.modArgs
|
||||
module TestModArgs {
|
||||
// _.overArgs
|
||||
module TestOverArgs {
|
||||
type Func1 = (a: boolean) => boolean;
|
||||
type Func2 = (a: boolean, b: boolean) => boolean;
|
||||
|
||||
@@ -6007,43 +6007,43 @@ module TestModArgs {
|
||||
{
|
||||
let result: (a: string) => boolean;
|
||||
|
||||
result = _.modArgs<Func1, (a: string) => boolean>(func1, transform1);
|
||||
result = _.modArgs<Func1, (a: string) => boolean>(func1, [transform1]);
|
||||
result = _.overArgs<Func1, (a: string) => boolean>(func1, transform1);
|
||||
result = _.overArgs<Func1, (a: string) => boolean>(func1, [transform1]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: (a: string, b: number) => boolean;
|
||||
|
||||
result = _.modArgs<Func2, (a: string, b: number) => boolean>(func2, transform1, transform2);
|
||||
result = _.modArgs<Func2, (a: string, b: number) => boolean>(func2, [transform1, transform2]);
|
||||
result = _.overArgs<Func2, (a: string, b: number) => boolean>(func2, transform1, transform2);
|
||||
result = _.overArgs<Func2, (a: string, b: number) => boolean>(func2, [transform1, transform2]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<(a: string) => boolean>;
|
||||
|
||||
result = _(func1).modArgs<(a: string) => boolean>(transform1);
|
||||
result = _(func1).modArgs<(a: string) => boolean>([transform1]);
|
||||
result = _(func1).overArgs<(a: string) => boolean>(transform1);
|
||||
result = _(func1).overArgs<(a: string) => boolean>([transform1]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashImplicitObjectWrapper<(a: string, b: number) => boolean>;
|
||||
|
||||
result = _(func2).modArgs<(a: string, b: number) => boolean>(transform1, transform2);
|
||||
result = _(func2).modArgs<(a: string, b: number) => boolean>([transform1, transform2]);
|
||||
result = _(func2).overArgs<(a: string, b: number) => boolean>(transform1, transform2);
|
||||
result = _(func2).overArgs<(a: string, b: number) => boolean>([transform1, transform2]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<(a: string) => boolean>;
|
||||
|
||||
result = _(func1).chain().modArgs<(a: string) => boolean>(transform1);
|
||||
result = _(func1).chain().modArgs<(a: string) => boolean>([transform1]);
|
||||
result = _(func1).chain().overArgs<(a: string) => boolean>(transform1);
|
||||
result = _(func1).chain().overArgs<(a: string) => boolean>([transform1]);
|
||||
}
|
||||
|
||||
{
|
||||
let result: _.LoDashExplicitObjectWrapper<(a: string, b: number) => boolean>;
|
||||
|
||||
result = _(func2).chain().modArgs<(a: string, b: number) => boolean>(transform1, transform2);
|
||||
result = _(func2).chain().modArgs<(a: string, b: number) => boolean>([transform1, transform2]);
|
||||
result = _(func2).chain().overArgs<(a: string, b: number) => boolean>(transform1, transform2);
|
||||
result = _(func2).chain().overArgs<(a: string, b: number) => boolean>([transform1, transform2]);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Vendored
+13
-13
@@ -21,7 +21,7 @@ TODO:
|
||||
- [x] Renamed _.first to _.head
|
||||
- [x] Renamed _.indexBy to _.keyBy
|
||||
- [x] Renamed _.invoke to _.invokeMap
|
||||
- [ ] Renamed _.modArgs to _.overArgs
|
||||
- [x] Renamed _.overArgs to _.overArgs
|
||||
- [ ] Renamed _.padLeft & _.padRight to _.padStart & _.padEnd
|
||||
- [ ] Renamed _.pairs to _.toPairs
|
||||
- [ ] Renamed _.rest to _.tail
|
||||
@@ -9620,7 +9620,7 @@ declare module _ {
|
||||
memoize<TResult extends MemoizedFunction>(resolver?: Function): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.modArgs
|
||||
//_.overArgs (was _.modArgs)
|
||||
interface LoDashStatic {
|
||||
/**
|
||||
* Creates a function that runs each argument through a corresponding transform function.
|
||||
@@ -9630,15 +9630,15 @@ declare module _ {
|
||||
* of functions.
|
||||
* @return Returns the new function.
|
||||
*/
|
||||
modArgs<T extends Function, TResult extends Function>(
|
||||
overArgs<T extends Function, TResult extends Function>(
|
||||
func: T,
|
||||
...transforms: Function[]
|
||||
): TResult;
|
||||
|
||||
/**
|
||||
* @see _.modArgs
|
||||
* @see _.overArgs
|
||||
*/
|
||||
modArgs<T extends Function, TResult extends Function>(
|
||||
overArgs<T extends Function, TResult extends Function>(
|
||||
func: T,
|
||||
transforms: Function[]
|
||||
): TResult;
|
||||
@@ -9646,26 +9646,26 @@ declare module _ {
|
||||
|
||||
interface LoDashImplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.modArgs
|
||||
* @see _.overArgs
|
||||
*/
|
||||
modArgs<TResult extends Function>(...transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
overArgs<TResult extends Function>(...transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.modArgs
|
||||
* @see _.overArgs
|
||||
*/
|
||||
modArgs<TResult extends Function>(transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
overArgs<TResult extends Function>(transforms: Function[]): LoDashImplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
interface LoDashExplicitObjectWrapper<T> {
|
||||
/**
|
||||
* @see _.modArgs
|
||||
* @see _.overArgs
|
||||
*/
|
||||
modArgs<TResult extends Function>(...transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
overArgs<TResult extends Function>(...transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
|
||||
/**
|
||||
* @see _.modArgs
|
||||
* @see _.overArgs
|
||||
*/
|
||||
modArgs<TResult extends Function>(transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
overArgs<TResult extends Function>(transforms: Function[]): LoDashExplicitObjectWrapper<TResult>;
|
||||
}
|
||||
|
||||
//_.negate
|
||||
|
||||
Reference in New Issue
Block a user