Skip to content

Commit

Permalink
ready
Browse files Browse the repository at this point in the history
  • Loading branch information
selfrefactor committed Jan 16, 2025
1 parent 353cf61 commit d02c241
Show file tree
Hide file tree
Showing 9 changed files with 8,050 additions and 20,016 deletions.
47 changes: 30 additions & 17 deletions .github/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15391,7 +15391,7 @@ describe('R.tail', () => {

```typescript

take<T>(howMany: number, input: T[]): T[]
take<T>(howMany: number, input: T): T extends string ? string : T
```

It returns the first `howMany` elements of `input`.
Expand All @@ -15413,9 +15413,8 @@ const result = [
<summary>All TypeScript definitions</summary>

```typescript
take<T>(howMany: number, input: T[]): T[];
take(howMany: number, input: string): string;
take<T>(howMany: number) : (input: T[]) => T[];
take<T>(howMany: number, input: T): T extends string ? string : T;
take<T>(howMany: number) : (input: T) => T extends string ? string : T;
```

</details>
Expand Down Expand Up @@ -15491,7 +15490,7 @@ describe('R.take - array', () => {
result // $ExpectType number[]
})
it('curried', () => {
const result = take(howMany)(list)
const result = take<number[]>(howMany)(list)

result // $ExpectType number[]
})
Expand All @@ -15504,7 +15503,7 @@ describe('R.take - string', () => {
result // $ExpectType string
})
it('curried', () => {
const result = take(howMany)(str)
const result = take<string>(howMany)(str)

result // $ExpectType string
})
Expand All @@ -15519,7 +15518,7 @@ describe('R.take - string', () => {

```typescript

takeLast<T>(howMany: number, input: T[]): T[]
takeLast<T>(howMany: number, input: T): T extends string ? string : T
```

It returns the last `howMany` elements of `input`.
Expand All @@ -15541,9 +15540,8 @@ const result = [
<summary>All TypeScript definitions</summary>

```typescript
takeLast<T>(howMany: number, input: T[]): T[];
takeLast(howMany: number, input: string): string;
takeLast<T>(howMany: number) : (input: T[]) => T[];
takeLast<T>(howMany: number, input: T): T extends string ? string : T;
takeLast<T>(howMany: number) : (input: T) => T extends string ? string : T;
```

</details>
Expand Down Expand Up @@ -15627,18 +15625,18 @@ describe('R.takeLast - array', () => {
result // $ExpectType number[]
})
it('curried', () => {
const result = takeLast(howMany)(list)
const result = takeLast<number[]>(howMany)(list)

result // $ExpectType number[]
})
it('real case', () => {
let data = ['foo']
let result = piped(
const data = ['foo', 'bar', 'baz', 'qux']
const result = piped(
data,
filter(
x => x.length >= 100
),
takeLast(5),
takeLast(2),
)
result // $ExpectType string[]
})
Expand All @@ -15651,7 +15649,7 @@ describe('R.takeLast - string', () => {
result // $ExpectType string
})
it('curried', () => {
const result = takeLast(howMany)(str)
const result = takeLast<string>(howMany)(str)

result // $ExpectType string
})
Expand Down Expand Up @@ -18558,12 +18556,27 @@ describe('R.zipWith', () => {

## ❯ CHANGELOG

9.4.2
9.4.2

- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #750](https://github.com/selfrefactor/rambda/issues/757)
- Fix TS issue when `R.take` is used as part of `R.pipe`.

Moving away from `Ramda` types which are problematic in this case:

```typescript
const data = ['foo', 'bar', 'baz', 'qux']
const result = piped(
data,
filter(
x => x.length >= 2
),
takeLast(2),
)
```

9.4.1

- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #750](https://github.com/selfrefactor/rambda/issues/757)

- Allow path input to not be transformed when string numbers are there - [Issue #750](https://github.com/selfrefactor/rambda/issues/750)

9.4.0
Expand Down
19 changes: 17 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,24 @@
9.4.2
9.4.2

- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #750](https://github.com/selfrefactor/rambda/issues/757)
- Fix TS issue when `R.take` is used as part of `R.pipe`.

Moving away from `Ramda` types which are problematic in this case:

```typescript
const data = ['foo', 'bar', 'baz', 'qux']
const result = piped(
data,
filter(
x => x.length >= 2
),
takeLast(2),
)
```

9.4.1

- Fix bug with `R.differenceWith` when two arrays has same length - [Issue #750](https://github.com/selfrefactor/rambda/issues/757)

- Allow path input to not be transformed when string numbers are there - [Issue #750](https://github.com/selfrefactor/rambda/issues/750)

9.4.0
Expand Down
Loading

0 comments on commit d02c241

Please sign in to comment.