Skip to content

Commit

Permalink
[lodash_v4.x.x] take input object as $ReadOnly (#3683)
Browse files Browse the repository at this point in the history
  • Loading branch information
BananaWanted authored and pascalduez committed Dec 23, 2019
1 parent 37b38f3 commit 1ea39ed
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1199,7 +1199,7 @@ declare module "lodash-es" {
): Object;
declare export function omit(object?: ?Object, ...props: $ReadOnlyArray<string>): Object;
declare export function omit(object?: ?Object, props: $ReadOnlyArray<string>): Object;
declare export function omitBy<A, T: { [id: string]: A, ... }>(
declare export function omitBy<A, T: $ReadOnly<{ [id: string]: A, ... }>>(
object: T,
predicate?: ?OPredicate<A, T>
): Object;
Expand All @@ -1209,7 +1209,7 @@ declare module "lodash-es" {
): {...};
declare export function pick(object?: ?Object, ...props: $ReadOnlyArray<string>): Object;
declare export function pick(object?: ?Object, props: $ReadOnlyArray<string>): Object;
declare export function pickBy<A, T: { [id: string]: A, ... }>(
declare export function pickBy<A, T: $ReadOnly<{ [id: string]: A, ... }>>(
object: T,
predicate?: ?OPredicate<A, T>
): Object;
Expand Down
14 changes: 7 additions & 7 deletions definitions/npm/lodash_v4.x.x/flow_v0.104.x-/lodash_v4.x.x.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,7 @@ declare module "lodash" {
values?: ?$ReadOnlyArray<any>,
comparator?: ?Function
): T;
pullAllWith<T>(array: T[], values?: ?(T[]), comparator?: ?Function): T[];
pullAllWith<T>(array: T[], values?: ?(T[]), comparator?: ?Function): T[];
pullAt<T>(array?: ?Array<T>, ...indexed?: Array<?number>): Array<T>;
pullAt<T>(array?: ?Array<T>, indexed?: ?Array<number>): Array<T>;
remove<T>(array?: ?Array<T>, predicate?: ?Predicate<T>): Array<T>;
Expand Down Expand Up @@ -1250,14 +1250,14 @@ declare module "lodash" {
): Object;
omit(object?: ?Object, ...props: $ReadOnlyArray<string>): Object;
omit(object?: ?Object, props: $ReadOnlyArray<string>): Object;
omitBy<A, T: { [id: any]: A, ... } | { [id: number]: A, ... }>(
omitBy<A, T: $ReadOnly<{ [id: any]: A, ... } | { [id: number]: A, ... }>>(
object: $ReadOnly<T>,
predicate?: ?OPredicate<A, T>
): Object;
omitBy<A, T>(object: void | null, predicate?: ?OPredicate<A, T>): {...};
pick(object?: ?Object, ...props: $ReadOnlyArray<string>): Object;
pick(object?: ?Object, props: $ReadOnlyArray<string>): Object;
pickBy<A, T: { [id: any]: A, ... } | { [id: number]: A, ... }>(
pickBy<A, T: $ReadOnly<{ [id: any]: A, ... } | { [id: number]: A, ... }>>(
object: $ReadOnly<T>,
predicate?: ?OPredicate<A, T>
): Object;
Expand Down Expand Up @@ -2957,20 +2957,20 @@ declare module "lodash/fp" {
omit(props: Array<string>, object: Object): Object;
omitAll(props: Array<string>): (object: Object) => Object;
omitAll(props: Array<string>, object: Object): Object;
omitBy<A, T: { [id: any]: A, ... }>(
omitBy<A, T: $ReadOnly<{ [id: any]: A, ... }>>(
predicate: OPredicate<A>
): (object: T) => Object;
omitBy<A, T: { [id: any]: A, ... }>(predicate: OPredicate<A>, object: T): Object;
omitBy<A, T: $ReadOnly<{ [id: any]: A, ... }>>(predicate: OPredicate<A>, object: T): Object;
pick(...props: Array<string | {...}>): Object;
pick(props: $ReadOnlyArray<string>, object: Object): Object;
pick(...props: Array<string>): (object: Object) => Object;
pick(props: $ReadOnlyArray<string>): (object: Object) => Object;
pickAll(props: Array<string>): (object: Object) => Object;
pickAll(props: Array<string>, object: Object): Object;
pickBy<A, T: { [id: any]: A, ... }>(
pickBy<A, T: $ReadOnly<{ [id: any]: A, ... }>>(
predicate: OPredicate<A>
): (object: T) => Object;
pickBy<A, T: { [id: any]: A, ... }>(predicate: OPredicate<A>, object: T): Object;
pickBy<A, T: $ReadOnly<{ [id: any]: A, ... }>>(predicate: OPredicate<A>, object: T): Object;
result(path: Path): (object: Object) => any;
result(path: Path, object: Object): any;
set(
Expand Down

0 comments on commit 1ea39ed

Please sign in to comment.