@@ -82,7 +82,7 @@ let hasWarnedAboutDeprecatedIsAsyncMode = false;
82
82
let hasWarnedAboutDeprecatedIsConcurrentMode = false ;
83
83
84
84
// AsyncMode should be deprecated
85
- export function isAsyncMode ( object : any ) {
85
+ export function isAsyncMode ( object : any ) : boolean {
86
86
if ( __DEV__ ) {
87
87
if ( ! hasWarnedAboutDeprecatedIsAsyncMode ) {
88
88
hasWarnedAboutDeprecatedIsAsyncMode = true ;
@@ -95,7 +95,7 @@ export function isAsyncMode(object: any) {
95
95
}
96
96
return false ;
97
97
}
98
- export function isConcurrentMode ( object : any ) {
98
+ export function isConcurrentMode ( object : any ) : boolean {
99
99
if ( __DEV__ ) {
100
100
if ( ! hasWarnedAboutDeprecatedIsConcurrentMode ) {
101
101
hasWarnedAboutDeprecatedIsConcurrentMode = true ;
@@ -108,43 +108,43 @@ export function isConcurrentMode(object: any) {
108
108
}
109
109
return false ;
110
110
}
111
- export function isContextConsumer ( object : any ) {
111
+ export function isContextConsumer ( object : any ) : boolean {
112
112
return typeOf ( object ) === REACT_CONTEXT_TYPE ;
113
113
}
114
- export function isContextProvider ( object : any ) {
114
+ export function isContextProvider ( object : any ) : boolean {
115
115
return typeOf ( object ) === REACT_PROVIDER_TYPE ;
116
116
}
117
- export function isElement ( object : any ) {
117
+ export function isElement ( object : any ) : boolean {
118
118
return (
119
119
typeof object === 'object' &&
120
120
object !== null &&
121
121
object . $$typeof === REACT_ELEMENT_TYPE
122
122
) ;
123
123
}
124
- export function isForwardRef ( object : any ) {
124
+ export function isForwardRef ( object : any ) : boolean {
125
125
return typeOf ( object ) === REACT_FORWARD_REF_TYPE ;
126
126
}
127
- export function isFragment ( object : any ) {
127
+ export function isFragment ( object : any ) : boolean {
128
128
return typeOf ( object ) === REACT_FRAGMENT_TYPE ;
129
129
}
130
- export function isLazy ( object : any ) {
130
+ export function isLazy ( object : any ) : boolean {
131
131
return typeOf ( object ) === REACT_LAZY_TYPE ;
132
132
}
133
- export function isMemo ( object : any ) {
133
+ export function isMemo ( object : any ) : boolean {
134
134
return typeOf ( object ) === REACT_MEMO_TYPE ;
135
135
}
136
- export function isPortal ( object : any ) {
136
+ export function isPortal ( object : any ) : boolean {
137
137
return typeOf ( object ) === REACT_PORTAL_TYPE ;
138
138
}
139
- export function isProfiler ( object : any ) {
139
+ export function isProfiler ( object : any ) : boolean {
140
140
return typeOf ( object ) === REACT_PROFILER_TYPE ;
141
141
}
142
- export function isStrictMode ( object : any ) {
142
+ export function isStrictMode ( object : any ) : boolean {
143
143
return typeOf ( object ) === REACT_STRICT_MODE_TYPE ;
144
144
}
145
- export function isSuspense ( object : any ) {
145
+ export function isSuspense ( object : any ) : boolean {
146
146
return typeOf ( object ) === REACT_SUSPENSE_TYPE ;
147
147
}
148
- export function isSuspenseList ( object : any ) {
148
+ export function isSuspenseList ( object : any ) : boolean {
149
149
return typeOf ( object ) === REACT_SUSPENSE_LIST_TYPE ;
150
150
}
0 commit comments