Skip to content

Commit

Permalink
chore@small
Browse files Browse the repository at this point in the history
  • Loading branch information
selfrefactor committed Feb 4, 2025
1 parent 305f4cb commit 6d64f1b
Show file tree
Hide file tree
Showing 6 changed files with 3 additions and 160 deletions.
53 changes: 0 additions & 53 deletions files/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5434,36 +5434,6 @@ Notes:
export function whereAny<Spec extends Record<PropertyKey, (value: any) => boolean>>(spec: Spec): <U extends Record<keyof Spec, any>>(testObj: U) => boolean;
export function whereAny<Spec extends Partial<Record<keyof U, (value: any) => boolean>>, U>(spec: Spec, testObj: U): boolean;

/*
Method: partialObject
Explanation: `R.partialObject` is a curry helper designed specifically for functions accepting object as a single argument.
Initially the function knows only a part from the whole input object and then `R.partialObject` helps in preparing the function for the second part, when it receives the rest of the input.
Example:
```
const fn = ({ a, b, c }) => a + b + c
const curried = R.partialObject(fn, { a : 1 })
const result = curried({
b : 2,
c : 3,
})
// => 6
```
Categories: Logic, Async
Notes: Function input can be asynchronous
*/
// @SINGLE_MARKER
export function partialObject<Input, PartialInput, Output>(
fn: (input: Input) => Output,
partialInput: PartialInput,
): (input: Pick<Input, Exclude<keyof Input, keyof PartialInput>>) => Output;

/*
Method: uniqBy
Expand Down Expand Up @@ -8802,29 +8772,6 @@ Notes:
export function contains<T, U>(target: T, compareTo: U): boolean;
export function contains<T, U>(target: T): (compareTo: U) => boolean;

/*
Method: partialCurry
Explanation: Same as `R.partialObject`.
When `Ramda` introduced `R.partialObject`, `Rambdax` already had such method, i.e. `R.partialCurry`. So this method is kept for backward compatibility.
Example:
```
```
Categories: Logic, Async
Notes: Function input can be asynchronous
*/
// @SINGLE_MARKER
export function partialCurry<Input, PartialInput, Output>(
fn: (input: Input) => Output,
partialInput: PartialInput,
): (input: Pick<Input, Exclude<keyof Input, keyof PartialInput>>) => Output;

/*
Method: noop
Expand Down
1 change: 0 additions & 1 deletion source/partialCurry.js

This file was deleted.

35 changes: 0 additions & 35 deletions source/partialObject-spec.ts

This file was deleted.

5 changes: 0 additions & 5 deletions source/partialObject.js

This file was deleted.

64 changes: 0 additions & 64 deletions source/partialObject.spec.js

This file was deleted.

5 changes: 3 additions & 2 deletions source/piped-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,8 +173,8 @@ describe('real use cases - books', () => {
const final: Expect<IsNotNever<typeof result>> = true;
});
it('case 2', () => {
const result = piped(
zaratustra,
const getResult = (book: BaseBook) => piped(
book,
assoc('status', 'famous' as Status),
assocPath<Book>('awards.number', 1),
defaultTo(awardedBaseValue),
Expand Down Expand Up @@ -205,6 +205,7 @@ describe('real use cases - books', () => {
return x as unknown as number;
}),
);
const result = getResult(zaratustra);
const final: Expect<IsNotNever<typeof result>> = true;
});
});

0 comments on commit 6d64f1b

Please sign in to comment.