Skip to content

Commit

Permalink
R.indexOf accepts void type. (#1643)
Browse files Browse the repository at this point in the history
  • Loading branch information
AndrewSouthpaw authored and gantoine committed Dec 29, 2017
1 parent a645cbd commit dd2e8d3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions definitions/npm/ramda_v0.x.x/flow_v0.49.x-/ramda_v0.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -640,9 +640,9 @@ declare module ramda {
input: A
): R;

declare function indexOf<E>(x: E, xs: Array<E>): number;
declare function indexOf<E>(x: ?E, xs: Array<E>): number;
declare function indexOf<E>(
x: E,
x: ?E,
...rest: Array<void>
): (xs: Array<E>) => number;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -118,14 +118,14 @@ const str: string = "hello world";

const ind: number = _.indexOf(1, ns);
const ind1: number = _.indexOf(str)(ss);

const ind2: { [key: string]: { [k: string]: number | string } } = _.indexBy(
x => "s",
os
);
const ind3: { [key: string]: { [k: string]: number | string } } = _.indexBy(
x => "s"
)(os);
const ind4: number = _.indexOf(null)(ss);

const insxs: Array<number> = _.insert(1, 2, ns);
const insxs2: Array<string> = _.insert(1, "2", ss);
Expand Down

0 comments on commit dd2e8d3

Please sign in to comment.