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
2 changes: 1 addition & 1 deletion .flowconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@

[libs]
./node_modules/fbjs/flow/lib/dev.js
./flow
./scripts/flow

[options]
module.system=haste
Expand Down
127 changes: 0 additions & 127 deletions flow/react-native-host-hooks.js

This file was deleted.

2 changes: 1 addition & 1 deletion flow/environment.js → scripts/flow/environment.js
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@

declare var __REACT_DEVTOOLS_GLOBAL_HOOK__: any; /*?{
inject: ?((stuff: Object) => void)
};*/
};*/
112 changes: 112 additions & 0 deletions scripts/flow/react-native-host-hooks.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
/**
* Copyright (c) 2015-present, Facebook, Inc.
*
* This source code is licensed under the MIT license found in the
* LICENSE file in the root directory of this source tree.
*
* @flow
*/

/* eslint-disable */

declare module 'deepDiffer' {
declare function exports(one: any, two: any): boolean;
}
declare module 'deepFreezeAndThrowOnMutationInDev' {
declare function exports<T>(obj: T): T;
}
declare module 'flattenStyle' {
}
declare module 'InitializeCore' {
}
declare module 'RCTEventEmitter' {
declare function register(mixed): void;
}
declare module 'TextInputState' {
declare function blurTextInput(object: any): void;
declare function focusTextInput(object: any): void;
}
declare module 'ExceptionsManager' {
declare function handleException(error: Error, isFatal: boolean): void;
}
declare module 'Platform' {
declare var OS: string;
}
declare module 'UIManager' {
declare var customBubblingEventTypes: Object;
declare var customDirectEventTypes: Object;
declare function createView(
reactTag: number,
viewName: string,
rootTag: number,
props: ?Object
): void;
declare function manageChildren(
containerTag: number,
moveFromIndices: Array<number>,
moveToIndices: Array<number>,
addChildReactTags: Array<number>,
addAtIndices: Array<number>,
removeAtIndices: Array<number>
): void;
declare function measure(hostComponent: mixed, callback: Function): void;
declare function measureInWindow(
nativeTag: ?number,
callback: Function
): void;
declare function measureLayout(
nativeTag: mixed,
nativeNode: number,
onFail: Function,
onSuccess: Function
): void;
declare function removeRootView(containerTag: number): void;
declare function removeSubviewsFromContainerWithID(containerId: number): void;
declare function replaceExistingNonRootView(): void;
declare function setChildren(
containerTag: number,
reactTags: Array<number>
): void;
declare function updateView(
reactTag: number,
viewName: string,
props: ?Object
): void;
declare function __takeSnapshot(
view?: 'window' | Element<any> | number,
options?: {
width?: number,
height?: number,
format?: 'png' | 'jpeg',
quality?: number,
}
): Promise<any>;
}
declare module 'View' {
declare var exports: typeof React$Component;
}

declare module 'RTManager' {
declare function createNode(
tag: number,
classType: string,
props: ?Object
): void;

declare function beginUpdates(): void;

declare function appendChildToContext(
contextTag: number,
childTag: number
): void;
declare function appendChild(parentTag: number, childTag: number): void;
declare function prependChild(childTag: number, beforeTag: number): void;
declare function deleteChild(childTag: number): void;
declare function updateNode(tag: number, props: ?Object): void;

declare function completeUpdates(): void;
}

declare module 'BatchedBridge' {
declare function registerCallableModule(name: string, module: Object): void;
}