Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/fun/mod.ts>optics.prop

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function optics.prop
import { optics } from "https://deno.land/x/fun@v2.0.0-alpha.6/mod.ts";
const { prop } = optics;

Given an Optic over a structure with a property P, construct a new Optic at that property P.

Type Parameters

A
P extends keyof A

Returns

<U extends Tag, S>(sa: Optic<U, S, A>) => Optic<Align<U, GetTag>, S, A[P]>