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 => {
|
public handleFocus = (): void => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
if (window.getInteractionMode() === 'keyboard') {
|
if (window.getInteractionMode() === 'keyboard') {
|
||||||
this.setSelected();
|
this.setSelected();
|
||||||
}
|
}
|
||||||
|
|
|
@ -442,9 +442,9 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
||||||
this.offsetFromBottom = undefined;
|
this.offsetFromBottom = undefined;
|
||||||
this.resizeFlag = false;
|
this.resizeFlag = false;
|
||||||
if (isNumber(row) && row > 0) {
|
if (isNumber(row) && row > 0) {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// This is a private interface we want to use.
|
||||||
// @ts-ignore
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
this.cellSizeCache.clearPlus(row, 0);
|
(this.cellSizeCache as any).clearPlus(row, 0);
|
||||||
} else {
|
} else {
|
||||||
this.cellSizeCache.clearAll();
|
this.cellSizeCache.clearAll();
|
||||||
}
|
}
|
||||||
|
@ -1010,14 +1010,10 @@ export class Timeline extends React.PureComponent<PropsType, StateType> {
|
||||||
|
|
||||||
public override componentDidMount(): void {
|
public override componentDidMount(): void {
|
||||||
this.updateWithVisibleRows();
|
this.updateWithVisibleRows();
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
window.registerForActive(this.updateWithVisibleRows);
|
window.registerForActive(this.updateWithVisibleRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
public override componentWillUnmount(): void {
|
public override componentWillUnmount(): void {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
window.unregisterForActive(this.updateWithVisibleRows);
|
window.unregisterForActive(this.updateWithVisibleRows);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -493,21 +493,19 @@ storiesOf('Components/Conversation/TimelineItem', module)
|
||||||
);
|
);
|
||||||
})
|
})
|
||||||
.add('Unknown Type', () => {
|
.add('Unknown Type', () => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore: intentional
|
|
||||||
const item = {
|
const item = {
|
||||||
type: 'random',
|
type: 'random',
|
||||||
data: {
|
data: {
|
||||||
somethin: 'somethin',
|
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} />;
|
return <TimelineItem {...getDefaultProps()} item={item} i18n={i18n} />;
|
||||||
})
|
})
|
||||||
.add('Missing Item', () => {
|
.add('Missing Item', () => {
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
// @ts-ignore: intentional
|
const item = null as any as TimelineItemProps['item'];
|
||||||
const item = null as TimelineItemProps['item'];
|
|
||||||
|
|
||||||
return <TimelineItem {...getDefaultProps()} item={item} i18n={i18n} />;
|
return <TimelineItem {...getDefaultProps()} item={item} i18n={i18n} />;
|
||||||
});
|
});
|
||||||
|
|
|
@ -165,11 +165,6 @@ export class ConversationModel extends window.Backbone
|
||||||
|
|
||||||
debouncedUpdateLastMessage?: () => void;
|
debouncedUpdateLastMessage?: () => void;
|
||||||
|
|
||||||
// backbone ensures this exists
|
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
||||||
// @ts-ignore
|
|
||||||
id: string;
|
|
||||||
|
|
||||||
initialPromise?: Promise<unknown>;
|
initialPromise?: Promise<unknown>;
|
||||||
|
|
||||||
inProgressFetch?: Promise<unknown>;
|
inProgressFetch?: Promise<unknown>;
|
||||||
|
@ -3303,10 +3298,6 @@ export class ConversationModel extends window.Backbone
|
||||||
this.get('e164')!,
|
this.get('e164')!,
|
||||||
regionCode
|
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) {
|
if (number.isValidNumber) {
|
||||||
this.set({ e164: number.e164 });
|
this.set({ e164: number.e164 });
|
||||||
return null;
|
return null;
|
||||||
|
|
|
@ -69,8 +69,9 @@ export class RecorderClass {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const stream = await navigator.mediaDevices.getUserMedia({
|
const stream = await navigator.mediaDevices.getUserMedia({
|
||||||
// @ts-expect-error Typescript doesn't know about these important options
|
// TypeScript doesn't know about these options.
|
||||||
audio: { mandatory: { googAutoGainControl: false } },
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
||||||
|
audio: { mandatory: { googAutoGainControl: false } } as any,
|
||||||
});
|
});
|
||||||
if (!this.context || !this.input) {
|
if (!this.context || !this.input) {
|
||||||
const err = new Error(
|
const err = new Error(
|
||||||
|
|
|
@ -581,9 +581,7 @@ function makeChannel(fnName: string) {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
// Ignoring this error TS2556: Expected 3 arguments, but got 0 or more.
|
// Ignoring this error TS2556: Expected 3 arguments, but got 0 or more.
|
||||||
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
return await (Server[serverFnName] as Function)(...args);
|
||||||
// @ts-ignore
|
|
||||||
return await Server[serverFnName](...args);
|
|
||||||
} catch (error) {
|
} catch (error) {
|
||||||
if (isCorruptionError(error)) {
|
if (isCorruptionError(error)) {
|
||||||
log.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'
|
// Inject synthetic Note to Self entry if query matches localized 'Note to Self'
|
||||||
if (noteToSelf.indexOf(providedQuery.toLowerCase()) !== -1) {
|
if (noteToSelf.indexOf(providedQuery.toLowerCase()) !== -1) {
|
||||||
// ensure that we don't have duplicates in our results
|
// ensure that we don't have duplicates in our results
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue