Remove several @ts-ignores
This commit is contained in:
parent
e0bd9f6958
commit
770c80b9ee
7 changed files with 11 additions and 36 deletions
|
@ -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} />;
|
||||
});
|
||||
|
|
|
@ -165,11 +165,6 @@ export class ConversationModel extends window.Backbone
|
|||
|
||||
debouncedUpdateLastMessage?: () => void;
|
||||
|
||||
// backbone ensures this exists
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
id: string;
|
||||
|
||||
initialPromise?: Promise<unknown>;
|
||||
|
||||
inProgressFetch?: Promise<unknown>;
|
||||
|
@ -3303,10 +3298,6 @@ export class ConversationModel extends window.Backbone
|
|||
this.get('e164')!,
|
||||
regionCode
|
||||
);
|
||||
// TODO: DESKTOP-723
|
||||
// This is valid, but the typing thinks it's a function.
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
if (number.isValidNumber) {
|
||||
this.set({ e164: number.e164 });
|
||||
return null;
|
||||
|
|
|
@ -69,8 +69,9 @@ export class RecorderClass {
|
|||
|
||||
try {
|
||||
const stream = await navigator.mediaDevices.getUserMedia({
|
||||
// @ts-expect-error Typescript doesn't know about these important options
|
||||
audio: { mandatory: { googAutoGainControl: false } },
|
||||
// TypeScript doesn't know about these options.
|
||||
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||
audio: { mandatory: { googAutoGainControl: false } } as any,
|
||||
});
|
||||
if (!this.context || !this.input) {
|
||||
const err = new Error(
|
||||
|
|
|
@ -581,9 +581,7 @@ function makeChannel(fnName: string) {
|
|||
|
||||
try {
|
||||
// Ignoring this error TS2556: Expected 3 arguments, but got 0 or more.
|
||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
||||
// @ts-ignore
|
||||
return await Server[serverFnName](...args);
|
||||
return await (Server[serverFnName] as Function)(...args);
|
||||
} catch (error) {
|
||||
if (isCorruptionError(error)) {
|
||||
log.error(
|
||||
|
|
|
@ -273,13 +273,6 @@ async function queryConversationsAndContacts(
|
|||
}
|
||||
}
|
||||
|
||||
// // @ts-ignore
|
||||
// console._log(
|
||||
// '%cqueryConversationsAndContacts',
|
||||
// 'background:black;color:red;',
|
||||
// { searchResults, conversations, ourNumber, ourUuid }
|
||||
// );
|
||||
|
||||
// Inject synthetic Note to Self entry if query matches localized 'Note to Self'
|
||||
if (noteToSelf.indexOf(providedQuery.toLowerCase()) !== -1) {
|
||||
// ensure that we don't have duplicates in our results
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue