Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

pick & omit #180

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 42 additions & 7 deletions docs/modules/Iso.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,13 @@ Added in v2.3.0
- [left](#left)
- [modify](#modify)
- [modifyF](#modifyf)
- [omit](#omit)
- [pick](#pick)
- [prop](#prop)
- [props](#props)
- [right](#right)
- [some](#some)
- [traverse](#traverse)
- [~~props~~](#props)
- [compositions](#compositions)
- [compose](#compose)
- [composeIso](#composeiso)
Expand Down Expand Up @@ -242,32 +244,49 @@ export declare function modifyF<F>(

Added in v2.3.5

## prop
## omit

Return a `Lens` from a `Iso` and a prop.
Return a `Lens` from a `Iso` and a list of props to remove.
A value-level 'Omit' (typescript utility type)

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Iso<S, A>) => Lens<S, A[P]>
export declare const omit: <A, P extends keyof A>(
props_0: P,
...props_1: P[]
) => <S>(sa: Iso<S, A>) => Lens<S, { [K in Exclude<keyof A, P>]: A[K] }>
```

Added in v2.3.8
Added in v2.3.13

## props
## pick

Return a `Lens` from a `Iso` and a list of props.
A value-level 'Pick' (typescript utility type)

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
export declare const pick: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Iso<S, A>) => Lens<S, { [K in P]: A[K] }>
```

Added in v2.3.13

## prop

Return a `Lens` from a `Iso` and a prop.

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Iso<S, A>) => Lens<S, A[P]>
```

Added in v2.3.8

## right
Expand Down Expand Up @@ -306,6 +325,22 @@ export declare function traverse<T extends URIS>(T: Traversable1<T>): <S, A>(sta

Added in v2.3.8

## ~~props~~

Use `fromStruct` instead.

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Iso<S, A>) => Lens<S, { [K in P]: A[K] }>
```

Added in v2.3.8

# compositions

## compose
Expand Down
49 changes: 42 additions & 7 deletions docs/modules/Lens.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -44,11 +44,13 @@ Added in v2.3.0
- [left](#left)
- [modify](#modify)
- [modifyF](#modifyf)
- [omit](#omit)
- [pick](#pick)
- [prop](#prop)
- [props](#props)
- [right](#right)
- [some](#some)
- [traverse](#traverse)
- [~~props~~](#props)
- [compositions](#compositions)
- [compose](#compose)
- [composeIso](#composeiso)
Expand Down Expand Up @@ -243,32 +245,49 @@ export declare function modifyF<F>(

Added in v2.3.5

## prop
## omit

Return a `Lens` from a `Lens` and a prop.
Return a `Lens` from a `Lens` and a list of props to remove.
A value-level 'Omit' (typescript utility type)

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Lens<S, A>) => Lens<S, A[P]>
export declare const omit: <A, P extends keyof A>(
props_0: P,
...props_1: P[]
) => <S>(sa: Lens<S, A>) => Lens<S, { [K in Exclude<keyof A, P>]: A[K] }>
```

Added in v2.3.0
Added in v2.3.13

## props
## pick

Return a `Lens` from a `Lens` and a list of props.
A value-level 'Pick' (typescript utility type)

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
export declare const pick: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Lens<S, A>) => Lens<S, { [K in P]: A[K] }>
```

Added in v2.3.13

## prop

Return a `Lens` from a `Lens` and a prop.

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Lens<S, A>) => Lens<S, A[P]>
```

Added in v2.3.0

## right
Expand Down Expand Up @@ -309,6 +328,22 @@ export declare function traverse<T extends URIS>(

Added in v2.3.0

## ~~props~~

Use `fromStruct` instead.

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Lens<S, A>) => Lens<S, { [K in P]: A[K] }>
```

Added in v2.3.0

# compositions

## compose
Expand Down
49 changes: 42 additions & 7 deletions docs/modules/Optional.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,12 +46,14 @@ Added in v2.3.0
- [modify](#modify)
- [modifyF](#modifyf)
- [modifyOption](#modifyoption)
- [omit](#omit)
- [pick](#pick)
- [prop](#prop)
- [props](#props)
- [right](#right)
- [setOption](#setoption)
- [some](#some)
- [traverse](#traverse)
- [~~props~~](#props)
- [compositions](#compositions)
- [compose](#compose)
- [composeIso](#composeiso)
Expand Down Expand Up @@ -257,32 +259,49 @@ export declare const modifyOption: <A>(f: (a: A) => A) => <S>(optional: Optional

Added in v2.3.0

## prop
## omit

Return a `Optional` from a `Optional` and a prop.
Return a `Optional` from a `Optional` and a list of props to remove.
A value-level 'Omit' (typescript utility type)

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Optional<S, A>) => Optional<S, A[P]>
export declare const omit: <A, P extends keyof A>(
props_0: P,
...props_1: P[]
) => <S>(sa: Optional<S, A>) => Optional<S, { [K in Exclude<keyof A, P>]: A[K] }>
```

Added in v2.3.0
Added in v2.3.13

## props
## pick

Return a `Optional` from a `Optional` and a list of props.
A value-level 'Pick' (typescript utility type)

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
export declare const pick: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Optional<S, A>) => Optional<S, { [K in P]: A[K] }>
```

Added in v2.3.13

## prop

Return a `Optional` from a `Optional` and a prop.

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Optional<S, A>) => Optional<S, A[P]>
```

Added in v2.3.0

## right
Expand Down Expand Up @@ -333,6 +352,22 @@ export declare function traverse<T extends URIS>(

Added in v2.3.0

## ~~props~~

Use `fromStruct` instead.

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Optional<S, A>) => Optional<S, { [K in P]: A[K] }>
```

Added in v2.3.0

# compositions

## compose
Expand Down
49 changes: 42 additions & 7 deletions docs/modules/Prism.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -41,12 +41,14 @@ Added in v2.3.0
- [modify](#modify)
- [modifyF](#modifyf)
- [modifyOption](#modifyoption)
- [omit](#omit)
- [pick](#pick)
- [prop](#prop)
- [props](#props)
- [right](#right)
- [set](#set)
- [some](#some)
- [traverse](#traverse)
- [~~props~~](#props)
- [compositions](#compositions)
- [compose](#compose)
- [composeIso](#composeiso)
Expand Down Expand Up @@ -254,32 +256,49 @@ export declare const modifyOption: <A>(f: (a: A) => A) => <S>(sa: Prism<S, A>) =

Added in v2.3.0

## prop
## omit

Return a `Optional` from a `Prism` and a prop.
Return a `Optional` from a `Prism` and a list of props to remove.
A value-level 'Omit' (typescript utility type)

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Prism<S, A>) => Optional<S, A[P]>
export declare const omit: <A, P extends keyof A>(
props_0: P,
...props_1: P[]
) => <S>(sa: Prism<S, A>) => Optional<S, { [K in Exclude<keyof A, P>]: A[K] }>
```

Added in v2.3.0
Added in v2.3.13

## props
## pick

Return a `Optional` from a `Prism` and a list of props.
A value-level 'Pick' (typescript utility type)

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
export declare const pick: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Prism<S, A>) => Optional<S, { [K in P]: A[K] }>
```

Added in v2.3.13

## prop

Return a `Optional` from a `Prism` and a prop.

**Signature**

```ts
export declare const prop: <A, P extends keyof A>(prop: P) => <S>(sa: Prism<S, A>) => Optional<S, A[P]>
```

Added in v2.3.0

## right
Expand Down Expand Up @@ -330,6 +349,22 @@ export declare function traverse<T extends URIS>(

Added in v2.3.0

## ~~props~~

Use `fromStruct` instead.

**Signature**

```ts
export declare const props: <A, P extends keyof A>(
props_0: P,
props_1: P,
...props_2: P[]
) => <S>(sa: Prism<S, A>) => Optional<S, { [K in P]: A[K] }>
```

Added in v2.3.0

# compositions

## compose
Expand Down
Loading