Skip to content

Commit 00b0c58

Browse files
committed
docs: add API documentation for @eslint-react/eff package
1 parent fe7115b commit 00b0c58

34 files changed

+5856
-185
lines changed

packages/utilities/eff/docs/README.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
**@eslint-react/eff**
2+
3+
***
4+
5+
# @eslint-react/eff
6+
7+
## Type Aliases
8+
9+
- [\_](type-aliases.md)
10+
- [NarrowedTo](type-aliases/NarrowedTo.md)
11+
- [Pretty](type-aliases/Pretty.md)
12+
13+
## Variables
14+
15+
- [\_](variables.md)
16+
- [compose](variables/compose.md)
17+
- [dual](variables/dual.md)
18+
19+
## Functions
20+
21+
- [absurd](functions/absurd.md)
22+
- [apply](functions/apply.md)
23+
- [chunk](functions/chunk.md)
24+
- [constant](functions/constant.md)
25+
- [constFalse](functions/constFalse.md)
26+
- [constNull](functions/constNull.md)
27+
- [constTrue](functions/constTrue.md)
28+
- [constVoid](functions/constVoid.md)
29+
- [flip](functions/flip.md)
30+
- [flow](functions/flow.md)
31+
- [getOrUpdate](functions/getOrUpdate.md)
32+
- [identity](functions/identity.md)
33+
- [isArray](functions/isArray.md)
34+
- [isFunction](functions/isFunction.md)
35+
- [isObject](functions/isObject.md)
36+
- [isTruthy](functions/isTruthy.md)
37+
- [not](functions/not.md)
38+
- [or](functions/or.md)
39+
- [pipe](functions/pipe.md)
40+
- [pipeArguments](functions/pipeArguments.md)
41+
- [tryAddToSet](functions/tryAddToSet.md)
42+
- [tupled](functions/tupled.md)
43+
- [untupled](functions/untupled.md)
44+
- [zipWith](functions/zipWith.md)
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / absurd
6+
7+
# Function: absurd()
8+
9+
> **absurd**\<`A`\>(`_`): `A`
10+
11+
The `absurd` function is a stub for cases where a value of type `never` is encountered in your code,
12+
meaning that it should be impossible for this code to be executed.
13+
14+
This function is particularly useful when it's necessary to specify that certain cases are impossible.
15+
16+
## Type Parameters
17+
18+
### A
19+
20+
`A`
21+
22+
## Parameters
23+
24+
### \_
25+
26+
`never`
27+
28+
The value of type `never` that is passed to the function.
29+
30+
## Returns
31+
32+
`A`
33+
34+
## Since
35+
36+
1.0.0
Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / apply
6+
7+
# Function: apply()
8+
9+
> **apply**\<`A`\>(`a`): \<`B`\>(`self`) => `B`
10+
11+
Apply a function to a given value.
12+
13+
## Type Parameters
14+
15+
### A
16+
17+
`A`
18+
19+
## Parameters
20+
21+
### a
22+
23+
`A`
24+
25+
The value to apply.
26+
27+
## Returns
28+
29+
> \<`B`\>(`self`): `B`
30+
31+
### Type Parameters
32+
33+
#### B
34+
35+
`B`
36+
37+
### Parameters
38+
39+
#### self
40+
41+
(`a`) => `B`
42+
43+
### Returns
44+
45+
`B`
46+
47+
## Example
48+
49+
```ts
50+
import * as assert from "node:assert"
51+
import { pipe, apply } from "effect/Function"
52+
import { length } from "effect/String"
53+
54+
assert.deepStrictEqual(pipe(length, apply("hello")), 5)
55+
```
56+
57+
## Since
58+
59+
1.0.0
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / chunk
6+
7+
# Function: chunk()
8+
9+
> **chunk**\<`T`\>(`array`, `size`): `T`[][]
10+
11+
## Type Parameters
12+
13+
### T
14+
15+
`T`
16+
17+
## Parameters
18+
19+
### array
20+
21+
`T`[]
22+
23+
### size
24+
25+
`number`
26+
27+
## Returns
28+
29+
`T`[][]
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / constFalse
6+
7+
# Function: constFalse()
8+
9+
> **constFalse**(): `false`
10+
11+
Do nothing and return false
12+
13+
## Returns
14+
15+
`false`
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / constNull
6+
7+
# Function: constNull()
8+
9+
> **constNull**(): `null`
10+
11+
Do nothing and return null
12+
13+
## Returns
14+
15+
`null`
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / constTrue
6+
7+
# Function: constTrue()
8+
9+
> **constTrue**(): `true`
10+
11+
Do nothing and return true
12+
13+
## Returns
14+
15+
`true`
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / constVoid
6+
7+
# Function: constVoid()
8+
9+
> **constVoid**(): `void`
10+
11+
Do nothing and return void
12+
13+
## Returns
14+
15+
`void`
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / constant
6+
7+
# Function: constant()
8+
9+
> **constant**\<`T`\>(`x`): () => `T`
10+
11+
Returns a function that always returns the same value.
12+
13+
## Type Parameters
14+
15+
### T
16+
17+
`T`
18+
19+
## Parameters
20+
21+
### x
22+
23+
`T`
24+
25+
The value to return.
26+
27+
## Returns
28+
29+
> (): `T`
30+
31+
### Returns
32+
33+
`T`
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
[**@eslint-react/eff**](../README.md)
2+
3+
***
4+
5+
[@eslint-react/eff](../README.md) / flip
6+
7+
# Function: flip()
8+
9+
> **flip**\<`A`, `B`, `C`\>(`f`): (...`b`) => (...`a`) => `C`
10+
11+
Reverses the order of arguments for a curried function.
12+
13+
## Type Parameters
14+
15+
### A
16+
17+
`A` *extends* `unknown`[]
18+
19+
### B
20+
21+
`B` *extends* `unknown`[]
22+
23+
### C
24+
25+
`C`
26+
27+
## Parameters
28+
29+
### f
30+
31+
(...`a`) => (...`b`) => `C`
32+
33+
The function to flip.
34+
35+
## Returns
36+
37+
> (...`b`): (...`a`) => `C`
38+
39+
### Parameters
40+
41+
#### b
42+
43+
...`B`
44+
45+
### Returns
46+
47+
> (...`a`): `C`
48+
49+
#### Parameters
50+
51+
##### a
52+
53+
...`A`
54+
55+
#### Returns
56+
57+
`C`
58+
59+
## Example
60+
61+
```ts
62+
import * as assert from "node:assert"
63+
import { flip } from "effect/Function"
64+
65+
const f = (a: number) => (b: string) => a - b.length
66+
67+
assert.deepStrictEqual(flip(f)('aaa')(2), -1)
68+
```
69+
70+
## Since
71+
72+
1.0.0

0 commit comments

Comments
 (0)