You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@@ -123,7 +141,7 @@ class CSSTransition extends React.Component {
123
141
}
124
142
};
125
143
126
-
onExit=(maybeNode)=>{
144
+
onExit=(maybeNode?: HTMLElement)=>{
127
145
const[node]=this.resolveArguments(maybeNode);
128
146
this.removeClasses(node,'appear');
129
147
this.removeClasses(node,'enter');
@@ -134,7 +152,7 @@ class CSSTransition extends React.Component {
134
152
}
135
153
};
136
154
137
-
onExiting=(maybeNode)=>{
155
+
onExiting=(maybeNode?: HTMLElement)=>{
138
156
const[node]=this.resolveArguments(maybeNode);
139
157
this.addClass(node,'exit','active');
140
158
@@ -143,7 +161,7 @@ class CSSTransition extends React.Component {
143
161
}
144
162
};
145
163
146
-
onExited=(maybeNode)=>{
164
+
onExited=(maybeNode?: HTMLElement)=>{
147
165
const[node]=this.resolveArguments(maybeNode);
148
166
this.removeClasses(node,'exit');
149
167
this.addClass(node,'exit','done');
@@ -154,12 +172,16 @@ class CSSTransition extends React.Component {
154
172
};
155
173
156
174
// when prop `nodeRef` is provided `node` is excluded
157
-
resolveArguments=(maybeNode,maybeAppearing)=>
175
+
resolveArguments=(
176
+
maybeNode: HTMLElement|boolean|undefined,
177
+
maybeAppearing?: boolean
178
+
): [HTMLElement,boolean]=>
179
+
// @ts-expect-error FIXME: Type at position 1 in source is not compatible with type at position 1 in target. Type 'boolean | HTMLElement' is not assignable to type 'boolean'. Type 'HTMLElement' is not assignable to type 'boolean'.ts(2322)
158
180
this.props.nodeRef
159
181
? [this.props.nodeRef.current,maybeNode]// here `maybeNode` is actually `appearing`
160
182
: [maybeNode,maybeAppearing];// `findDOMNode` was used
// @ts-expect-error FIXME: Property 'active' does not exist on type '{} | {} | {}'.ts(7053)
202
229
this.appliedClasses[type][phase]=className;
230
+
// @ts-expect-error FIXME: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'.ts(2345)
// @ts-expect-error FIXME: Property 'base' does not exist on type '{} | {} | {}'.ts(2339)
209
238
base: baseClassName,
239
+
// @ts-expect-error FIXME: Property 'active' does not exist on type '{} | {} | {}'.ts(2339)
210
240
active: activeClassName,
241
+
// @ts-expect-error FIMXE: Property 'done' does not exist on type '{} | {} | {}'.ts(2339)
211
242
done: doneClassName,
212
243
}=this.appliedClasses[type];
213
244
214
245
this.appliedClasses[type]={};
215
246
216
247
if(baseClassName){
248
+
// @ts-expect-error FIXME: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'.ts(2345)
217
249
removeClass(node,baseClassName);
218
250
}
219
251
if(activeClassName){
252
+
// @ts-expect-error FIXME: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'.ts(2345)
220
253
removeClass(node,activeClassName);
221
254
}
222
255
if(doneClassName){
256
+
// @ts-expect-error FIXME: Argument of type 'HTMLElement | null' is not assignable to parameter of type 'HTMLElement'. Type 'null' is not assignable to type 'HTMLElement'.ts(2345)
223
257
removeClass(node,doneClassName);
224
258
}
225
259
}
@@ -241,6 +275,7 @@ class CSSTransition extends React.Component {
241
275
}
242
276
}
243
277
278
+
// @ts-expect-error To make TS migration diffs minimum, I've left propTypes here instead of defining a static property
// @ts-expect-error Element implicitly has an 'any' type because expression of type 'any' can't be used to index type 'Readonly<Props> & Readonly<{ children?: ReactNode; }>'.ts(7053)
31
40
if(this.props[handler]){
32
41
constmaybeNode=child.props.nodeRef
33
42
? undefined
34
43
: ReactDOM.findDOMNode(this);
35
-
44
+
// @ts-expect-error FIXME: Argument of type 'Element | Text | null | undefined' is not assignable to parameter of type 'HTMLElement'.ts(2769)
0 commit comments