import { curry } from './curry' ; import { Apply , Fn } from './types' ; param args param fn export const apply = curry ( < Args extends readonly any [ ] , T extends Fn < Args > > ( args , fn ) : Apply < Args , T > => fn ( ... args ) ) as { < Args extends readonly any [ ] , T extends Fn < Args > > ( args , fn ) : Apply < Args , T > ; < Args extends readonly any [ ] > ( args ) : < T extends Fn < Args > > ( fn : T ) => Apply < Args , T > ; } ;