mirror of
https://github.com/facebook/react.git
synced 2025-11-01 09:12:30 +00:00
@@ -29,7 +29,7 @@ export type ReactElement = {
|
||||
|
||||
// __DEV__
|
||||
_store: {
|
||||
validated: bool,
|
||||
validated: boolean,
|
||||
},
|
||||
_self: ReactElement,
|
||||
_shadowChildren: any,
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
},
|
||||
|
||||
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
@@ -40,7 +40,7 @@ export type HostConfig<T, P, I, C> = {
|
||||
updateContainer(containerInfo : C, children : HostChildren<I>) : void;
|
||||
|
||||
createInstance(type : T, props : P, children : HostChildren<I>) : I,
|
||||
prepareUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren<I>) : bool,
|
||||
prepareUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren<I>) : boolean,
|
||||
commitUpdate(instance : I, oldProps : P, newProps : P, children : HostChildren<I>) : void,
|
||||
deleteInstance(instance : I) : void,
|
||||
|
||||
|
||||
@@ -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,
|
||||
};
|
||||
|
||||
@@ -34,5 +34,5 @@ export type ReactInstance = {
|
||||
_mountImage: any,
|
||||
// __DEV__
|
||||
_debugID: DebugID,
|
||||
_warnedAboutRefsInRender: bool,
|
||||
_warnedAboutRefsInRender: boolean,
|
||||
};
|
||||
|
||||
@@ -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' &&
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -103,7 +103,7 @@ var TransactionImpl = {
|
||||
*/
|
||||
getTransactionWrappers: null,
|
||||
|
||||
isInTransaction: function(): bool {
|
||||
isInTransaction: function(): boolean {
|
||||
return !!this._isInTransaction;
|
||||
},
|
||||
|
||||
|
||||
@@ -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') {
|
||||
|
||||
Reference in New Issue
Block a user