Fix another TSC error

This commit is contained in:
ErickSkrauch 2024-12-24 01:04:57 +01:00
parent f2036012d3
commit 8851c8a665
No known key found for this signature in database
GPG Key ID: 669339FCBB30EE0E

View File

@ -139,7 +139,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
onFormSubmit: () => void; onFormSubmit: () => void;
} | null = null; } | null = null;
timerIds: Array<ReturnType<typeof setTimeout>> = []; // this is a list of a probably running timeouts to clean on unmount timerIds: Array<number> = []; // this is a list of a probably running timeouts to clean on unmount
componentDidUpdate(prevProps: Props) { componentDidUpdate(prevProps: Props) {
const nextPanel: PanelId = this.props.Body && (this.props.Body.type as any).panelId; const nextPanel: PanelId = this.props.Body && (this.props.Body.type as any).panelId;
@ -160,7 +160,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
if (forceHeight) { if (forceHeight) {
this.timerIds.push( this.timerIds.push(
setTimeout(() => { window.setTimeout(() => {
this.setState({ forceHeight: 0 }); this.setState({ forceHeight: 0 });
}, 100), }, 100),
); );
@ -537,7 +537,7 @@ class PanelTransition extends React.PureComponent<Props, State> {
this.setState({ isHeightDirty: false }); this.setState({ isHeightDirty: false });
// wait till transition end // wait till transition end
this.timerIds.push(setTimeout(resolve, 200)); this.timerIds.push(window.setTimeout(() => resolve(), 200));
}), }),
); );
} }