Skip to content

Commit

Permalink
chore: update flowtype definitions
Browse files Browse the repository at this point in the history
  • Loading branch information
gcedo committed Jun 9, 2017
1 parent 318b1f3 commit 980f5ee
Show file tree
Hide file tree
Showing 7 changed files with 471 additions and 2 deletions.
32 changes: 32 additions & 0 deletions flow-typed/npm/babel-preset-react_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
// flow-typed signature: 751f0876db59dedb43ce42d65c6d65c2
// flow-typed version: <<STUB>>/babel-preset-react_v^6.24.1/flow_v0.47.0

/**
* This is an autogenerated libdef stub for:
*
* 'babel-preset-react'
*
* 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:
* https://github.com/flowtype/flow-typed
*/

declare module "babel-preset-react" {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module "babel-preset-react/lib/index" {
declare module.exports: any;
}

// Filename aliases
declare module "babel-preset-react/lib/index.js" {
declare module.exports: $Exports<"babel-preset-react/lib/index">;
}
102 changes: 102 additions & 0 deletions flow-typed/npm/enzyme_v2.3.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,102 @@
// flow-typed signature: a66d63ce84b8c546ae8bc484f7b4c4bc
// flow-typed version: 778b20e026/enzyme_v2.3.x/flow_>=v0.28.x

declare module "enzyme" {
declare type PredicateFunction<T: Wrapper> = (wrapper: T) => boolean;
declare type NodeOrNodes = React$Element<any> | Array<React$Element<any>>;
declare type EnzymeSelector = string | ReactClass<any> | 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$Element<any>): boolean,
containsAllMatchingElements(nodes: NodeOrNodes): boolean,
containsAnyMatchingElements(nodes: NodeOrNodes): boolean,
dive(option?: { context?: Object }): this,
exists(): boolean,
matchesElement(node: React$Element<any>): boolean,
hasClass(className: string): boolean,
is(selector: EnzymeSelector): boolean,
isEmpty(): boolean,
not(selector: EnzymeSelector): boolean,
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$Element<any>,
getNode(): React$Element<any>,
getNodes(): Array<React$Element<any>>,
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: Object, callback?: Function): this,
setProps(props: Object): this,
setContext(context: Object): this,
instance(): React$Component<any, any, any>,
update(): this,
debug(): string,
type(): string | Function | null,
name(): string,
forEach(fn: (node: this) => any): this,
map<T>(fn: (node: this) => 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 export class ReactWrapper extends Wrapper {
mount(): this,
ref(refName: string): this,
detach(): void
}

declare export class ShallowWrapper extends Wrapper {
equals(node: React$Element<any>): boolean,
shallow(options?: { context?: Object }): ShallowWrapper
}

declare export function shallow(
node: React$Element<any>,
options?: { context?: Object }
): ShallowWrapper;
declare export function mount(
node: React$Element<any>,
options?: {
context?: Object,
attachTo?: HTMLElement,
childContextTypes?: Object
}
): ReactWrapper;
declare export function render(
node: React$Element<any>,
options?: { context?: Object }
): CheerioWrapper;
}
46 changes: 46 additions & 0 deletions flow-typed/npm/husky_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
// flow-typed signature: bc7e35cfe732c44252faa0c5684e2c5d
// flow-typed version: <<STUB>>/husky_v^0.13.4/flow_v0.47.0

/**
* This is an autogenerated libdef stub for:
*
* 'husky'
*
* 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:
* https://github.com/flowtype/flow-typed
*/

declare module "husky" {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module "husky/bin/install" {
declare module.exports: any;
}

declare module "husky/bin/uninstall" {
declare module.exports: any;
}

declare module "husky/src/index" {
declare module.exports: any;
}

// Filename aliases
declare module "husky/bin/install.js" {
declare module.exports: $Exports<"husky/bin/install">;
}
declare module "husky/bin/uninstall.js" {
declare module.exports: $Exports<"husky/bin/uninstall">;
}
declare module "husky/src/index.js" {
declare module.exports: $Exports<"husky/src/index">;
}
9 changes: 7 additions & 2 deletions flow-typed/npm/jest_v20.x.x.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
// flow-typed signature: 336a37cc59a5628d581d11f98d1d94ab
// flow-typed version: ef52b40a4e/jest_v20.x.x/flow_>=v0.33.x
// flow-typed signature: 4a17c39f87ff2e03571b7c8dd220d801
// flow-typed version: fd46f49e63/jest_v20.x.x/flow_>=v0.33.x

type JestMockFn = {
(...args: Array<any>): any,
Expand Down Expand Up @@ -210,6 +210,11 @@ type JestExpectType = {
* specific arguments.
*/
toHaveBeenCalledWith(...args: Array<any>): void,
/**
* Use .toHaveBeenLastCalledWith to ensure that a mock function was last called
* with specific arguments.
*/
toHaveBeenLastCalledWith(...args: Array<any>): void,
/**
* Check that an object has a .length property and it is set to a certain
* numeric value.
Expand Down
145 changes: 145 additions & 0 deletions flow-typed/npm/lint-staged_vx.x.x.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,145 @@
// flow-typed signature: 804069e4ce72c00f4a44a1d471c7e163
// flow-typed version: <<STUB>>/lint-staged_v^3.6.0/flow_v0.47.0

/**
* This is an autogenerated libdef stub for:
*
* 'lint-staged'
*
* 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:
* https://github.com/flowtype/flow-typed
*/

declare module "lint-staged" {
declare module.exports: any;
}

/**
* We include stubs for each file inside this npm package in case you need to
* require those files directly. Feel free to delete any files that aren't
* needed.
*/
declare module "lint-staged/src/calcChunkSize" {
declare module.exports: any;
}

declare module "lint-staged/src/findBin" {
declare module.exports: any;
}

declare module "lint-staged/src/generateTasks" {
declare module.exports: any;
}

declare module "lint-staged/src/index" {
declare module.exports: any;
}

declare module "lint-staged/src/readConfigOption" {
declare module.exports: any;
}

declare module "lint-staged/src/runScript" {
declare module.exports: any;
}

declare module "lint-staged/test/__mocks__/execa" {
declare module.exports: any;
}

declare module "lint-staged/test/__mocks__/npm-which" {
declare module.exports: any;
}

declare module "lint-staged/test/calcChunkSize.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/findBin.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/generateTasks.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/readConfigOption.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/runScript-mock-findBin.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/runScript-mock-pMap.spec" {
declare module.exports: any;
}

declare module "lint-staged/test/runScript.spec" {
declare module.exports: any;
}

declare module "lint-staged/wallaby" {
declare module.exports: any;
}

// Filename aliases
declare module "lint-staged/index" {
declare module.exports: $Exports<"lint-staged">;
}
declare module "lint-staged/index.js" {
declare module.exports: $Exports<"lint-staged">;
}
declare module "lint-staged/src/calcChunkSize.js" {
declare module.exports: $Exports<"lint-staged/src/calcChunkSize">;
}
declare module "lint-staged/src/findBin.js" {
declare module.exports: $Exports<"lint-staged/src/findBin">;
}
declare module "lint-staged/src/generateTasks.js" {
declare module.exports: $Exports<"lint-staged/src/generateTasks">;
}
declare module "lint-staged/src/index.js" {
declare module.exports: $Exports<"lint-staged/src/index">;
}
declare module "lint-staged/src/readConfigOption.js" {
declare module.exports: $Exports<"lint-staged/src/readConfigOption">;
}
declare module "lint-staged/src/runScript.js" {
declare module.exports: $Exports<"lint-staged/src/runScript">;
}
declare module "lint-staged/test/__mocks__/execa.js" {
declare module.exports: $Exports<"lint-staged/test/__mocks__/execa">;
}
declare module "lint-staged/test/__mocks__/npm-which.js" {
declare module.exports: $Exports<"lint-staged/test/__mocks__/npm-which">;
}
declare module "lint-staged/test/calcChunkSize.spec.js" {
declare module.exports: $Exports<"lint-staged/test/calcChunkSize.spec">;
}
declare module "lint-staged/test/findBin.spec.js" {
declare module.exports: $Exports<"lint-staged/test/findBin.spec">;
}
declare module "lint-staged/test/generateTasks.spec.js" {
declare module.exports: $Exports<"lint-staged/test/generateTasks.spec">;
}
declare module "lint-staged/test/readConfigOption.spec.js" {
declare module.exports: $Exports<"lint-staged/test/readConfigOption.spec">;
}
declare module "lint-staged/test/runScript-mock-findBin.spec.js" {
declare module.exports: $Exports<
"lint-staged/test/runScript-mock-findBin.spec"
>;
}
declare module "lint-staged/test/runScript-mock-pMap.spec.js" {
declare module.exports: $Exports<"lint-staged/test/runScript-mock-pMap.spec">;
}
declare module "lint-staged/test/runScript.spec.js" {
declare module.exports: $Exports<"lint-staged/test/runScript.spec">;
}
declare module "lint-staged/wallaby.js" {
declare module.exports: $Exports<"lint-staged/wallaby">;
}
Loading

0 comments on commit 980f5ee

Please sign in to comment.