diff --git a/src/isomorphic/classic/element/ReactElementType.js b/src/isomorphic/classic/element/ReactElementType.js index e959241737..9702b0f77a 100644 --- a/src/isomorphic/classic/element/ReactElementType.js +++ b/src/isomorphic/classic/element/ReactElementType.js @@ -29,7 +29,7 @@ export type ReactElement = { // __DEV__ _store: { - validated: bool, + validated: boolean, }, _self: ReactElement, _shadowChildren: any, diff --git a/src/isomorphic/hooks/ReactComponentTreeHook.js b/src/isomorphic/hooks/ReactComponentTreeHook.js index 929ed7c98f..ae769001c9 100644 --- a/src/isomorphic/hooks/ReactComponentTreeHook.js +++ b/src/isomorphic/hooks/ReactComponentTreeHook.js @@ -297,7 +297,7 @@ var ReactComponentTreeHook = { unmountedIDs.length = 0; }, - isMounted(id: DebugID): bool { + isMounted(id: DebugID): boolean { var item = getItem(id); return item ? item.isMounted : false; }, diff --git a/src/renderers/native/ReactNativeTagHandles.js b/src/renderers/native/ReactNativeTagHandles.js index 2a4d7bd010..d0c7bb2685 100644 --- a/src/renderers/native/ReactNativeTagHandles.js +++ b/src/renderers/native/ReactNativeTagHandles.js @@ -48,7 +48,7 @@ var ReactNativeTagHandles = { ); }, - reactTagIsNativeTopRootID: function(reactTag: number): bool { + reactTagIsNativeTopRootID: function(reactTag: number): boolean { // We reserve all tags that are 1 mod 10 for native root views return reactTag % 10 === 1; }, diff --git a/src/renderers/native/__mocks__/deepDiffer.js b/src/renderers/native/__mocks__/deepDiffer.js index cc58e4b328..34e4da74a0 100644 --- a/src/renderers/native/__mocks__/deepDiffer.js +++ b/src/renderers/native/__mocks__/deepDiffer.js @@ -11,7 +11,7 @@ // TODO: Move deepDiffer into react -var deepDiffer = function(one: any, two: any): bool { +var deepDiffer = function(one: any, two: any): boolean { if (one === two) { // Short circuit on identical object references instead of traversing them. return false; diff --git a/src/renderers/shared/ReactDebugTool.js b/src/renderers/shared/ReactDebugTool.js index 7b726d7dd1..31ef8c7073 100644 --- a/src/renderers/shared/ReactDebugTool.js +++ b/src/renderers/shared/ReactDebugTool.js @@ -254,7 +254,7 @@ function resumeCurrentLifeCycleTimer() { } var lastMarkTimeStamp = 0; -var canUsePerformanceMeasure: bool = +var canUsePerformanceMeasure: boolean = // $FlowFixMe https://github.com/facebook/flow/issues/2345 typeof performance !== 'undefined' && typeof performance.mark === 'function' && @@ -323,7 +323,7 @@ var ReactDebugTool = { } } }, - isProfiling(): bool { + isProfiling(): boolean { return isProfiling; }, beginProfiling(): void { diff --git a/src/renderers/shared/fiber/ReactFiberReconciler.js b/src/renderers/shared/fiber/ReactFiberReconciler.js index 4ece60a0f2..d5e03669e6 100644 --- a/src/renderers/shared/fiber/ReactFiberReconciler.js +++ b/src/renderers/shared/fiber/ReactFiberReconciler.js @@ -40,7 +40,7 @@ export type HostConfig = { updateContainer(containerInfo : C, children : HostChildren) : void; createInstance(type : T, props : P, children : HostChildren) : I, - prepareUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren) : bool, + prepareUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren) : boolean, commitUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren) : void, deleteInstance(instance : I) : void, diff --git a/src/renderers/shared/fiber/ReactFiberRoot.js b/src/renderers/shared/fiber/ReactFiberRoot.js index c0b312253c..1c972700b0 100644 --- a/src/renderers/shared/fiber/ReactFiberRoot.js +++ b/src/renderers/shared/fiber/ReactFiberRoot.js @@ -22,7 +22,7 @@ export type FiberRoot = { // The currently active root fiber. This is the mutable root of the tree. current: Fiber, // Determines if this root has already been added to the schedule for work. - isScheduled: bool, + isScheduled: boolean, // The work schedule is a linked list. nextScheduledRoot: ?FiberRoot, }; diff --git a/src/renderers/shared/stack/reconciler/ReactInstanceType.js b/src/renderers/shared/stack/reconciler/ReactInstanceType.js index d647f4afc9..15f321b6cb 100644 --- a/src/renderers/shared/stack/reconciler/ReactInstanceType.js +++ b/src/renderers/shared/stack/reconciler/ReactInstanceType.js @@ -34,5 +34,5 @@ export type ReactInstance = { _mountImage: any, // __DEV__ _debugID: DebugID, - _warnedAboutRefsInRender: bool, + _warnedAboutRefsInRender: boolean, }; diff --git a/src/renderers/shared/stack/reconciler/ReactOwner.js b/src/renderers/shared/stack/reconciler/ReactOwner.js index 270f7fb933..c634dfb384 100644 --- a/src/renderers/shared/stack/reconciler/ReactOwner.js +++ b/src/renderers/shared/stack/reconciler/ReactOwner.js @@ -21,7 +21,7 @@ import type { ReactInstance } from 'ReactInstanceType'; * @return {boolean} True if `object` is a valid owner. * @final */ -function isValidOwner(object: any): bool { +function isValidOwner(object: any): boolean { return !!( object && typeof object.attachRef === 'function' && diff --git a/src/renderers/shared/stack/reconciler/ReactRef.js b/src/renderers/shared/stack/reconciler/ReactRef.js index 43210a5a26..4781561b91 100644 --- a/src/renderers/shared/stack/reconciler/ReactRef.js +++ b/src/renderers/shared/stack/reconciler/ReactRef.js @@ -53,7 +53,7 @@ ReactRef.attachRefs = function( ReactRef.shouldUpdateRefs = function( prevElement: ReactElement | string | number | null | false, nextElement: ReactElement | string | number | null | false, -): bool { +): boolean { // If either the owner or a `ref` has changed, make sure the newest owner // has stored a reference to `this`, and the previous owner (if different) // has forgotten the reference to `this`. We use the element instead diff --git a/src/renderers/shared/utils/Transaction.js b/src/renderers/shared/utils/Transaction.js index b8bee0b169..afa8bc9b38 100644 --- a/src/renderers/shared/utils/Transaction.js +++ b/src/renderers/shared/utils/Transaction.js @@ -103,7 +103,7 @@ var TransactionImpl = { */ getTransactionWrappers: null, - isInTransaction: function(): bool { + isInTransaction: function(): boolean { return !!this._isInTransaction; }, diff --git a/src/renderers/shared/utils/isTextInputElement.js b/src/renderers/shared/utils/isTextInputElement.js index c2635ac5e2..e464daae31 100644 --- a/src/renderers/shared/utils/isTextInputElement.js +++ b/src/renderers/shared/utils/isTextInputElement.js @@ -33,7 +33,7 @@ var supportedInputTypes: {[key: string]: true | void} = { 'week': true, }; -function isTextInputElement(elem: ?HTMLElement): bool { +function isTextInputElement(elem: ?HTMLElement): boolean { var nodeName = elem && elem.nodeName && elem.nodeName.toLowerCase(); if (nodeName === 'input') {