import { Lens } from 'monocle-ts' ; function _prop < K extends keyof T , T extends object > ( k , obj ) { return Lens . fromProp < T > ( ) ( k ) . get ( obj ) ; } since export function prop < K extends string > ( k ) ; export function prop < K extends keyof T , T extends object > ( k , obj ) ; export function prop < K extends string , T extends Record < K , any > > ( k , obj ? ) { if ( obj === undefined ) { return < T extends Record < K , any > > ( obj ) : T [ K ] => _prop ( k , obj ) ; } else { return _prop ( k , obj ) ; } }