import { insertAt } from 'fp-ts/lib/Record' ; function _assoc < K extends string , V , A extends object > ( k , v , obj ) { return insertAt ( k , v ) ( obj ) as A & Record < K , V > ; } since export function assoc < K extends string > ( k ) ; export function assoc < K extends string , V > ( k , v ) ; export function assoc < K extends string , V , A extends object > ( k , v , obj ) ; export function assoc < K extends string , V , A extends object > ( k , v ? , obj ? ) { if ( v === undefined ) { return ( v , obj ? ) => { if ( obj === undefined ) { return ( obj ) => _assoc ( k , v , obj ) ; } else { return _assoc ( k , v , obj ) ; } } ; } else if ( obj === undefined ) { return ( obj ) => _assoc ( k , v , obj ) ; } else { return _assoc ( k , v , obj ) ; } }