mirror of
https://github.com/signalapp/Signal-Desktop.git
synced 2025-12-25 04:36:46 +00:00
Remove several @ts-ignores
This commit is contained in:
@@ -22,8 +22,6 @@ export class InlineNotificationWrapper extends React.Component<PropsType> {
|
||||
};
|
||||
|
||||
public handleFocus = (): void => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (window.getInteractionMode() === 'keyboard') {
|
||||
this.setSelected();
|
||||
}
|
||||
|
||||
@@ -442,9 +442,9 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
||||
this.offsetFromBottom = undefined;
|
||||
this.resizeFlag = false;
|
||||
if (isNumber(row) && row > 0) {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
this.cellSizeCache.clearPlus(row, 0);
|
||||
// This is a private interface we want to use.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
(this.cellSizeCache as any).clearPlus(row, 0);
|
||||
} else {
|
||||
this.cellSizeCache.clearAll();
|
||||
}
|
||||
@@ -1010,14 +1010,10 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
||||
|
||||
public override componentDidMount(): void {
|
||||
this.updateWithVisibleRows();
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
window.registerForActive(this.updateWithVisibleRows);
|
||||
}
|
||||
|
||||
public override componentWillUnmount(): void {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
window.unregisterForActive(this.updateWithVisibleRows);
|
||||
}
|
||||
|
||||
|
||||
@@ -493,21 +493,19 @@ storiesOf('Components/Conversation/TimelineItem', module)
|
||||
);
|
||||
})
|
||||
.add('Unknown Type', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: intentional
|
||||
const item = {
|
||||
type: 'random',
|
||||
data: {
|
||||
somethin: 'somethin',
|
||||
},
|
||||
} as TimelineItemProps['item'];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
} as any as TimelineItemProps['item'];
|
||||
|
||||
return <TimelineItem {...getDefaultProps()} item={item} i18n={i18n} />;
|
||||
})
|
||||
.add('Missing Item', () => {
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore: intentional
|
||||
const item = null as TimelineItemProps['item'];
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
const item = null as any as TimelineItemProps['item'];
|
||||
|
||||
return <TimelineItem {...getDefaultProps()} item={item} i18n={i18n} />;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user