Skip to content

Commit

Permalink
fix(typings): add missed types to concatRight, sliceFrom, sliceTo, li…
Browse files Browse the repository at this point in the history
…ftFN

Closes #176
  • Loading branch information
srghma2 authored and char0n committed Oct 23, 2017
1 parent 8fb7640 commit 96a31cb
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion src/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -303,7 +303,10 @@ declare namespace RamdaAdjunct {
/**
* Returns the result of concatenating the given lists or strings.
*/
concatRight<T extends Array<any>|string>(firstList: T, secondList: T): T;
concatRight<T extends Array<any>>(firstList: T, secondList: T): T;
concatRight<T extends Array<any>>(firstList: T): (secondList: T) => T;
concatRight(firstList: string, secondList: string): string;
concatRight(firstList: string): (secondList: string) => string;

/**
* Acts as multiple path: arrays of paths in, array of values out. Preserves order.
Expand All @@ -316,6 +319,7 @@ declare namespace RamdaAdjunct {
* the Apply spec of fantasy land.
*/
liftFN<T>(arity: number, fn: Variadic<Apply<T>, T>): Apply<T>;
liftFN(arity: number): <T>(fn: Variadic<Apply<T>, T>) => Apply<T>;

/**
* "lifts" a function of arity > 1 so that it may "map over" objects that satisfy
Expand Down Expand Up @@ -543,13 +547,15 @@ declare namespace RamdaAdjunct {
* Dispatches to the slice method of the third argument, if present.
*/
sliceFrom<T>(fromIndex: number, list: string|Array<T>): string|Array<T>;
sliceFrom(fromIndex: number): <T>(list: string|Array<T>) => string|Array<T>;

/**
* Returns the elements of the given list or string (or object with a slice method)
* to toIndex (exclusive).
* Dispatches to the slice method of the second argument, if present.
*/
sliceTo<T>(toIndex: number, list: string|Array<T>): string|Array<T>;
sliceTo(toIndex: number): <T>(list: string|Array<T>) => string|Array<T>;

/**
* Identity type.
Expand Down

0 comments on commit 96a31cb

Please sign in to comment.