Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .eslintignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
flow-typed/npm
8 changes: 4 additions & 4 deletions flow-typed/npm/babel-cli_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: d0500d72eccbf8f597f96e1bf847cb49
// flow-typed version: <<STUB>>/babel-cli_v^6.23.0/flow_v0.44.2
// flow-typed signature: 45660148c1072407a12908e4a58550b5
// flow-typed version: <<STUB>>/babel-cli_v^6.26.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/babel-core_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 4341303e784ff268dc25c78b7e791f3c
// flow-typed version: <<STUB>>/babel-core_v^6.23.1/flow_v0.44.2
// flow-typed signature: e170ae7946934c3818270e0627bf3a9d
// flow-typed version: <<STUB>>/babel-core_v^6.26.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/babel-eslint_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 1cb67debeb22ec888ccf223017a168fa
// flow-typed version: <<STUB>>/babel-eslint_v^7.2.2/flow_v0.44.2
// flow-typed signature: 65c9f1430648fbaf06abeea3169ff3da
// flow-typed version: <<STUB>>/babel-eslint_v^8.0.1/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: e638f5f854ee9027644cf7f0063d5dc2
// flow-typed version: <<STUB>>/babel-plugin-transform-class-properties_v^6.23.0/flow_v0.44.2
// flow-typed signature: cf3bc0356d67782191b2b36d97d81970
// flow-typed version: <<STUB>>/babel-plugin-transform-class-properties_v^6.23.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 606f6b4804064186f79d797dec2d820e
// flow-typed version: <<STUB>>/babel-plugin-transform-object-rest-spread_v^6.23.0/flow_v0.44.2
// flow-typed signature: c79ae7b10f85a37814a90523174e0236
// flow-typed version: <<STUB>>/babel-plugin-transform-object-rest-spread_v^6.26.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/babel-preset-react_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 72e9a248f6cb6ef575de0934b4a64ae1
// flow-typed version: <<STUB>>/babel-preset-react_v^6.23.0/flow_v0.44.2
// flow-typed signature: bff1985ae6b9c7e669a20f154f7e94dd
// flow-typed version: <<STUB>>/babel-preset-react_v^6.23.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/common-tags_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 094eabe58486c1d4ae2a4e864532bb7d
// flow-typed version: <<STUB>>/common-tags_v1.4.0/flow_v0.44.2
// flow-typed signature: f6e5aa6965fd9feac8f1ab681ecab28d
// flow-typed version: <<STUB>>/common-tags_v^1.4.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand Down
4 changes: 2 additions & 2 deletions flow-typed/npm/enzyme-adapter-react-16_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6a2ef3f516799b251e20582efe6cd6d5
// flow-typed version: <<STUB>>/enzyme-adapter-react-16_v1.0.1/flow_v0.56.0
// flow-typed signature: d04faa5466057868764e4f44d922918e
// flow-typed version: <<STUB>>/enzyme-adapter-react-16_v^1.0.1/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand Down
125 changes: 125 additions & 0 deletions flow-typed/npm/enzyme_v3.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,125 @@
// flow-typed signature: a18e8395a43c22fe55906624f2a7ddb9
// flow-typed version: e351e417db/enzyme_v3.x.x/flow_>=v0.53.x

import * as React from "react";

declare module "enzyme" {
declare type PredicateFunction<T: Wrapper> = (
wrapper: T,
index: number
) => boolean;
declare type NodeOrNodes = React.Node | Array<React.Node>;
declare type EnzymeSelector = string | Class<React.Component<*, *>> | Object;

// CheerioWrapper is a type alias for an actual cheerio instance
// TODO: Reference correct type from cheerio's type declarations
declare type CheerioWrapper = any;

declare class Wrapper {
find(selector: EnzymeSelector): this,
findWhere(predicate: PredicateFunction<this>): this,
filter(selector: EnzymeSelector): this,
filterWhere(predicate: PredicateFunction<this>): this,
contains(nodeOrNodes: NodeOrNodes): boolean,
containsMatchingElement(node: React.Node): boolean,
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
containsAnyMatchingElements(nodes: NodeOrNodes): boolean,
dive(option?: { context?: Object }): this,
exists(): boolean,
matchesElement(node: React.Node): boolean,
hasClass(className: string): boolean,
is(selector: EnzymeSelector): boolean,
isEmpty(): boolean,
not(selector: EnzymeSelector): this,
children(selector?: EnzymeSelector): this,
childAt(index: number): this,
parents(selector?: EnzymeSelector): this,
parent(): this,
closest(selector: EnzymeSelector): this,
render(): CheerioWrapper,
unmount(): this,
text(): string,
html(): string,
get(index: number): React.Node,
getNodes(): Array<React.Node>,
getDOMNode(): HTMLElement | HTMLInputElement,
at(index: number): this,
first(): this,
last(): this,
state(key?: string): any,
context(key?: string): any,
props(): Object,
prop(key: string): any,
key(): string,
simulate(event: string, ...args: Array<any>): this,
setState(state: {}, callback?: Function): this,
setProps(props: {}): this,
setContext(context: Object): this,
instance(): React.Component<*, *>,
update(): this,
debug(): string,
type(): string | Function | null,
name(): string,
forEach(fn: (node: this, index: number) => mixed): this,
map<T>(fn: (node: this, index: number) => T): Array<T>,
reduce<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
reduceRight<T>(
fn: (value: T, node: this, index: number) => T,
initialValue?: T
): Array<T>,
some(selector: EnzymeSelector): boolean,
someWhere(predicate: PredicateFunction<this>): boolean,
every(selector: EnzymeSelector): boolean,
everyWhere(predicate: PredicateFunction<this>): boolean,
length: number
}

declare class ReactWrapper extends Wrapper {
constructor(nodes: NodeOrNodes, root: any, options?: ?Object): ReactWrapper,
mount(): this,
ref(refName: string): this,
detach(): void
}

declare class ShallowWrapper extends Wrapper {
constructor(
nodes: NodeOrNodes,
root: any,
options?: ?Object
): ShallowWrapper,
equals(node: React.Node): boolean,
shallow(options?: { context?: Object }): ShallowWrapper
}

declare function shallow(
node: React.Node,
options?: { context?: Object, disableLifecycleMethods?: boolean }
): ShallowWrapper;
declare function mount(
node: React.Node,
options?: {
context?: Object,
attachTo?: HTMLElement,
childContextTypes?: Object
}
): ReactWrapper;
declare function render(
node: React.Node,
options?: { context?: Object }
): CheerioWrapper;

declare module.exports: {
configure(options: {
Adapter?: any,
disableLifecycleMethods?: boolean
}): void,
render: typeof render,
mount: typeof mount,
shallow: typeof shallow,
ShallowWrapper: typeof ShallowWrapper,
ReactWrapper: typeof ReactWrapper
};
}
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint-config-airbnb_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 6149bb83fac6cbd5766d1a96195c6bab
// flow-typed version: <<STUB>>/eslint-config-airbnb_v^14.1.0/flow_v0.44.2
// flow-typed signature: 5f7491279c78c925f139ed87b321b884
// flow-typed version: <<STUB>>/eslint-config-airbnb_v^14.1.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint-config-jss_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 46ff06a873d0d379a10bb2fe6fb7e409
// flow-typed version: <<STUB>>/eslint-config-jss_v^3.0.0/flow_v0.44.2
// flow-typed signature: 34140f16a8448b221b96e19e3b4a468d
// flow-typed version: <<STUB>>/eslint-config-jss_v^3.0.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint-plugin-import_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: b5e479b189bcd9bc4b9366de7b65eb11
// flow-typed version: <<STUB>>/eslint-plugin-import_v^2.2.0/flow_v0.44.2
// flow-typed signature: 75472699afd70d75a4cb1e39aa19a66f
// flow-typed version: <<STUB>>/eslint-plugin-import_v^2.2.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint-plugin-jsx-a11y_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 64098b4a5ab6e8107c6dcbc887dcdd88
// flow-typed version: <<STUB>>/eslint-plugin-jsx-a11y_v^4.0.0/flow_v0.44.2
// flow-typed signature: 8deaf6d13c77c3ddeb0a4db67d5d7eaf
// flow-typed version: <<STUB>>/eslint-plugin-jsx-a11y_v^4.0.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint-plugin-react_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 9e21243d7be361361dd789d8af3e54c9
// flow-typed version: <<STUB>>/eslint-plugin-react_v^6.10.3/flow_v0.44.2
// flow-typed signature: cd8ef439afbad07a53be0281acf2ea41
// flow-typed version: <<STUB>>/eslint-plugin-react_v^6.10.3/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
8 changes: 4 additions & 4 deletions flow-typed/npm/eslint_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 1e05835267055a0359408a2f631c25f1
// flow-typed version: <<STUB>>/eslint_v^3.13.0/flow_v0.44.2
// flow-typed signature: 7a730b6611f20b6c94a779e4be892f49
// flow-typed version: <<STUB>>/eslint_v^3.13.0/flow_v0.56.0

/**
* This is an autogenerated libdef stub for:
Expand All @@ -8,8 +8,8 @@
*
* Fill this stub out by replacing all the `any` types.
*
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* Once filled out, we encourage you to share your work with the
* community by sending a pull request to:
* https://github.com/flowtype/flow-typed
*/

Expand Down
Loading