From ede34ecee37a6bc6468aa184210fa218ac222bed Mon Sep 17 00:00:00 2001 From: Evan Hahn <69474926+EvanHahn-Signal@users.noreply.github.com> Date: Fri, 12 Nov 2021 17:44:20 -0600 Subject: [PATCH] Enable `noImplicitOverride` TypeScript compiler option --- package.json | 2 +- ts/components/ContactListItem.tsx | 2 +- ts/components/Countdown.tsx | 8 +- ts/components/Intl.tsx | 2 +- ts/components/MainHeader.tsx | 8 +- ts/components/conversation/AddNewLines.tsx | 4 +- ts/components/conversation/ContactDetail.tsx | 2 +- .../conversation/ConversationHeader.tsx | 2 +- ts/components/conversation/Emojify.tsx | 4 +- ts/components/conversation/ErrorBoundary.tsx | 2 +- ts/components/conversation/ExpireTimer.tsx | 8 +- .../conversation/GroupNotification.tsx | 2 +- ts/components/conversation/Image.tsx | 2 +- .../InlineNotificationWrapper.tsx | 8 +- ts/components/conversation/Linkify.tsx | 4 +- ts/components/conversation/Message.tsx | 8 +- ts/components/conversation/MessageDetail.tsx | 4 +- ts/components/conversation/Quote.tsx | 4 +- ts/components/conversation/Timeline.tsx | 8 +- ts/components/conversation/TimelineItem.tsx | 2 +- .../conversation/TimelineLoadingRow.tsx | 4 +- ts/components/conversation/Timestamp.tsx | 6 +- ts/components/conversation/TypingBubble.tsx | 2 +- .../conversation/VerificationNotification.tsx | 2 +- .../media-gallery/AttachmentSection.tsx | 4 +- .../media-gallery/DocumentListItem.tsx | 4 +- .../media-gallery/MediaGallery.tsx | 6 +- .../media-gallery/MediaGridItem.tsx | 4 +- .../conversationList/MessageBodyHighlight.tsx | 2 +- .../leftPane/LeftPaneArchiveHelper.tsx | 10 +- .../LeftPaneChooseGroupMembersHelper.tsx | 8 +- .../leftPane/LeftPaneComposeHelper.tsx | 6 +- .../leftPane/LeftPaneInboxHelper.tsx | 8 +- .../leftPane/LeftPaneSearchHelper.tsx | 8 +- .../LeftPaneSetGroupMetadataHelper.tsx | 8 +- ts/jobs/normalMessageSendJobQueue.ts | 2 +- ts/jobs/reactionJobQueue.ts | 2 +- ts/models/conversations.ts | 10 +- ts/models/messages.ts | 8 +- ts/quill/emoji/blot.tsx | 12 +- ts/quill/mentions/blot.tsx | 12 +- ts/test-node/jobs/JobQueue_test.ts | 4 +- ts/textsecure/CDSSocket.ts | 12 +- ts/textsecure/Errors.ts | 6 +- ts/textsecure/MessageReceiver.ts | 73 ++++--- ts/textsecure/SocketManager.ts | 15 +- ts/textsecure/WebsocketResources.ts | 4 +- ts/views/conversation_view.ts | 2 +- ts/views/inbox_view.ts | 4 +- tsconfig.json | 1 + yarn.lock | 198 ++++++++++++++---- 51 files changed, 339 insertions(+), 194 deletions(-) diff --git a/package.json b/package.json index ab23bbd5cc5e..1a124ffaf7d5 100644 --- a/package.json +++ b/package.json @@ -174,7 +174,7 @@ "@babel/plugin-proposal-optional-chaining": "7.13.8", "@babel/plugin-transform-runtime": "7.8.3", "@babel/preset-react": "7.7.4", - "@babel/preset-typescript": "7.13.0", + "@babel/preset-typescript": "7.16.0", "@chanzuckerberg/axe-storybook-testing": "3.0.2", "@electron/fuses": "1.2.1", "@storybook/addon-actions": "5.1.11", diff --git a/ts/components/ContactListItem.tsx b/ts/components/ContactListItem.tsx index 307bf603ca3e..3acb12857730 100644 --- a/ts/components/ContactListItem.tsx +++ b/ts/components/ContactListItem.tsx @@ -69,7 +69,7 @@ export class ContactListItem extends React.Component { ); } - public render(): JSX.Element { + public override render(): JSX.Element { const { about, i18n, isAdmin, isMe, name, onClick, title, type } = this.props; diff --git a/ts/components/Countdown.tsx b/ts/components/Countdown.tsx index 69e02c67217e..5352495cee8e 100644 --- a/ts/components/Countdown.tsx +++ b/ts/components/Countdown.tsx @@ -26,15 +26,15 @@ export class Countdown extends React.Component { this.state = { ratio }; } - public componentDidMount(): void { + public override componentDidMount(): void { this.startLoop(); } - public componentDidUpdate(): void { + public override componentDidUpdate(): void { this.startLoop(); } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { this.stopLoop(); } @@ -70,7 +70,7 @@ export class Countdown extends React.Component { } }; - public render(): JSX.Element { + public override render(): JSX.Element { const { ratio } = this.state; const strokeDashoffset = ratio * CIRCUMFERENCE; diff --git a/ts/components/Intl.tsx b/ts/components/Intl.tsx index 5100da004563..7a6d612e0679 100644 --- a/ts/components/Intl.tsx +++ b/ts/components/Intl.tsx @@ -67,7 +67,7 @@ export class Intl extends React.Component { } // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types - public render() { + public override render() { const { components, id, i18n, renderText } = this.props; const text = i18n(id); diff --git a/ts/components/MainHeader.tsx b/ts/components/MainHeader.tsx index fe1c7ffb181e..d1598a3113f5 100644 --- a/ts/components/MainHeader.tsx +++ b/ts/components/MainHeader.tsx @@ -65,7 +65,7 @@ export class MainHeader extends React.Component { }; } - public componentDidUpdate(prevProps: PropsType): void { + public override componentDidUpdate(prevProps: PropsType): void { const { searchConversation, startSearchCounter } = this.props; // When user chooses to search in a given conversation we focus the field for them @@ -119,11 +119,11 @@ export class MainHeader extends React.Component { } }; - public componentDidMount(): void { + public override componentDidMount(): void { document.addEventListener('keydown', this.handleGlobalKeyDown); } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { const { popperRoot } = this.state; document.removeEventListener('click', this.handleOutsideClick); @@ -191,7 +191,7 @@ export class MainHeader extends React.Component { } }; - public render(): JSX.Element { + public override render(): JSX.Element { const { avatarPath, badge, diff --git a/ts/components/conversation/AddNewLines.tsx b/ts/components/conversation/AddNewLines.tsx index b626b2c126e0..813d9ef6f329 100644 --- a/ts/components/conversation/AddNewLines.tsx +++ b/ts/components/conversation/AddNewLines.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -16,7 +16,7 @@ export class AddNewLines extends React.Component { renderNonNewLine: ({ text }) => text, }; - public render(): + public override render(): | JSX.Element | string | null diff --git a/ts/components/conversation/ContactDetail.tsx b/ts/components/conversation/ContactDetail.tsx index ece9fadc6a75..0ee7e40e0db1 100644 --- a/ts/components/conversation/ContactDetail.tsx +++ b/ts/components/conversation/ContactDetail.tsx @@ -214,7 +214,7 @@ export class ContactDetail extends React.Component { }); } - public render(): JSX.Element { + public override render(): JSX.Element { const { contact, hasSignalAccount, i18n, onSendMessage } = this.props; const isIncoming = false; const module = 'contact-detail'; diff --git a/ts/components/conversation/ConversationHeader.tsx b/ts/components/conversation/ConversationHeader.tsx index 3e0cb4a033b0..07cd88f37f57 100644 --- a/ts/components/conversation/ConversationHeader.tsx +++ b/ts/components/conversation/ConversationHeader.tsx @@ -587,7 +587,7 @@ export class ConversationHeader extends React.Component { ); } - public render(): ReactNode { + public override render(): ReactNode { const { id, isSMSOnly, i18n, onSetDisappearingMessages, expireTimer } = this.props; const { isNarrow, modalState } = this.state; diff --git a/ts/components/conversation/Emojify.tsx b/ts/components/conversation/Emojify.tsx index 9c2da353e2b5..a34fd56bda42 100644 --- a/ts/components/conversation/Emojify.tsx +++ b/ts/components/conversation/Emojify.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -54,7 +54,7 @@ export class Emojify extends React.Component { renderNonEmoji: ({ text }) => text, }; - public render(): null | Array { + public override render(): null | Array { const { text, sizeClass, renderNonEmoji } = this.props; // We have to do this, because renderNonEmoji is not required in our Props object, diff --git a/ts/components/conversation/ErrorBoundary.tsx b/ts/components/conversation/ErrorBoundary.tsx index ab56d32302ec..03c18facbe06 100644 --- a/ts/components/conversation/ErrorBoundary.tsx +++ b/ts/components/conversation/ErrorBoundary.tsx @@ -36,7 +36,7 @@ export class ErrorBoundary extends React.PureComponent { return { error }; } - public render(): ReactNode { + public override render(): ReactNode { const { error } = this.state; const { i18n, children } = this.props; diff --git a/ts/components/conversation/ExpireTimer.tsx b/ts/components/conversation/ExpireTimer.tsx index 1e526100d57c..3eb2a0ac9d52 100644 --- a/ts/components/conversation/ExpireTimer.tsx +++ b/ts/components/conversation/ExpireTimer.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -24,7 +24,7 @@ export class ExpireTimer extends React.Component { this.interval = null; } - public componentDidMount(): void { + public override componentDidMount(): void { const { expirationLength } = this.props; const increment = getIncrement(expirationLength); const updateFrequency = Math.max(increment, 500); @@ -39,13 +39,13 @@ export class ExpireTimer extends React.Component { this.interval = setInterval(update, updateFrequency); } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { if (this.interval) { clearInterval(this.interval); } } - public render(): JSX.Element { + public override render(): JSX.Element { const { direction, expirationLength, diff --git a/ts/components/conversation/GroupNotification.tsx b/ts/components/conversation/GroupNotification.tsx index 92258b58efeb..fd6405306576 100644 --- a/ts/components/conversation/GroupNotification.tsx +++ b/ts/components/conversation/GroupNotification.tsx @@ -120,7 +120,7 @@ export class GroupNotification extends React.Component { } } - public render(): JSX.Element { + public override render(): JSX.Element { const { changes: rawChanges, i18n, from } = this.props; // This check is just to be extra careful, and can probably be removed. diff --git a/ts/components/conversation/Image.tsx b/ts/components/conversation/Image.tsx index 7be98db098f4..b9fa523cefa3 100644 --- a/ts/components/conversation/Image.tsx +++ b/ts/components/conversation/Image.tsx @@ -132,7 +132,7 @@ export class Image extends React.Component { ); }; - public render(): JSX.Element { + public override render(): JSX.Element { const { alt, attachment, diff --git a/ts/components/conversation/InlineNotificationWrapper.tsx b/ts/components/conversation/InlineNotificationWrapper.tsx index 7e80050c8a92..cbb7ccbfd7a5 100644 --- a/ts/components/conversation/InlineNotificationWrapper.tsx +++ b/ts/components/conversation/InlineNotificationWrapper.tsx @@ -1,4 +1,4 @@ -// Copyright 2019-2020 Signal Messenger, LLC +// Copyright 2019-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -37,14 +37,14 @@ export class InlineNotificationWrapper extends React.Component { } }; - public componentDidMount(): void { + public override componentDidMount(): void { const { isSelected } = this.props; if (isSelected) { this.setFocus(); } } - public componentDidUpdate(prevProps: PropsType): void { + public override componentDidUpdate(prevProps: PropsType): void { const { isSelected } = this.props; if (!prevProps.isSelected && isSelected) { @@ -52,7 +52,7 @@ export class InlineNotificationWrapper extends React.Component { } } - public render(): JSX.Element { + public override render(): JSX.Element { const { children } = this.props; return ( diff --git a/ts/components/conversation/Linkify.tsx b/ts/components/conversation/Linkify.tsx index aefa236ae891..b215d8f87f6d 100644 --- a/ts/components/conversation/Linkify.tsx +++ b/ts/components/conversation/Linkify.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -326,7 +326,7 @@ export class Linkify extends React.Component { renderNonLink: ({ text }) => text, }; - public render(): + public override render(): | JSX.Element | string | null diff --git a/ts/components/conversation/Message.tsx b/ts/components/conversation/Message.tsx index 8d07ba87b69d..70b0c5215f8a 100644 --- a/ts/components/conversation/Message.tsx +++ b/ts/components/conversation/Message.tsx @@ -418,7 +418,7 @@ export class Message extends React.PureComponent { } }; - public componentDidMount(): void { + public override componentDidMount(): void { this.startSelectedTimer(); this.startDeleteForEveryoneTimer(); @@ -445,7 +445,7 @@ export class Message extends React.PureComponent { } } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { if (this.selectedTimeout) { clearTimeout(this.selectedTimeout); } @@ -462,7 +462,7 @@ export class Message extends React.PureComponent { this.toggleReactionPicker(true); } - public componentDidUpdate(prevProps: Props): void { + public override componentDidUpdate(prevProps: Props): void { const { canDeleteForEveryone, isSelected, status, timestamp } = this.props; this.startSelectedTimer(); @@ -2414,7 +2414,7 @@ export class Message extends React.PureComponent { ); } - public render(): JSX.Element | null { + public override render(): JSX.Element | null { const { author, attachments, direction, id, isSticker, timestamp } = this.props; const { expired, expiring, imageBroken, isSelected } = this.state; diff --git a/ts/components/conversation/MessageDetail.tsx b/ts/components/conversation/MessageDetail.tsx index 46d6f5619245..a5387496d904 100644 --- a/ts/components/conversation/MessageDetail.tsx +++ b/ts/components/conversation/MessageDetail.tsx @@ -105,7 +105,7 @@ export class MessageDetail extends React.Component { private readonly messageContainerRef = React.createRef(); - public componentDidMount(): void { + public override componentDidMount(): void { // When this component is created, it's initially not part of the DOM, and then it's // added off-screen and animated in. This ensures that the focus takes. setTimeout(() => { @@ -257,7 +257,7 @@ export class MessageDetail extends React.Component { ); } - public render(): JSX.Element { + public override render(): JSX.Element { const { errors, message, diff --git a/ts/components/conversation/Quote.tsx b/ts/components/conversation/Quote.tsx index 59cc583c9100..ebea8bd1cad5 100644 --- a/ts/components/conversation/Quote.tsx +++ b/ts/components/conversation/Quote.tsx @@ -126,7 +126,7 @@ export class Quote extends React.Component { }; } - componentDidMount(): void { + override componentDidMount(): void { const { doubleCheckMissingQuoteReference, referencedMessageNotFound } = this.props; @@ -427,7 +427,7 @@ export class Quote extends React.Component { ); } - public render(): JSX.Element | null { + public override render(): JSX.Element | null { const { conversationColor, customColor, diff --git a/ts/components/conversation/Timeline.tsx b/ts/components/conversation/Timeline.tsx index 121cb4874a63..2cb5be8fb5e5 100644 --- a/ts/components/conversation/Timeline.tsx +++ b/ts/components/conversation/Timeline.tsx @@ -1005,20 +1005,20 @@ export class Timeline extends React.PureComponent { } }; - public componentDidMount(): void { + public override componentDidMount(): void { this.updateWithVisibleRows(); // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore window.registerForActive(this.updateWithVisibleRows); } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { // eslint-disable-next-line @typescript-eslint/ban-ts-comment // @ts-ignore window.unregisterForActive(this.updateWithVisibleRows); } - public componentDidUpdate( + public override componentDidUpdate( prevProps: Readonly, prevState: Readonly ): void { @@ -1311,7 +1311,7 @@ export class Timeline extends React.PureComponent { } }; - public render(): JSX.Element | null { + public override render(): JSX.Element | null { const { acknowledgeGroupMemberNameCollisions, areWeAdmin, diff --git a/ts/components/conversation/TimelineItem.tsx b/ts/components/conversation/TimelineItem.tsx index 876c1821043b..49b6f19b6481 100644 --- a/ts/components/conversation/TimelineItem.tsx +++ b/ts/components/conversation/TimelineItem.tsx @@ -171,7 +171,7 @@ export type PropsType = PropsLocalType & >; export class TimelineItem extends React.PureComponent { - public render(): JSX.Element | null { + public override render(): JSX.Element | null { const { containerElementRef, conversationId, diff --git a/ts/components/conversation/TimelineLoadingRow.tsx b/ts/components/conversation/TimelineLoadingRow.tsx index 6a81a4ec1486..50c38a0a00e4 100644 --- a/ts/components/conversation/TimelineLoadingRow.tsx +++ b/ts/components/conversation/TimelineLoadingRow.tsx @@ -1,4 +1,4 @@ -// Copyright 2019-2020 Signal Messenger, LLC +// Copyright 2019-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -40,7 +40,7 @@ export class TimelineLoadingRow extends React.PureComponent { return ; } - public render(): JSX.Element { + public override render(): JSX.Element { return (
{this.renderContents()}
); diff --git a/ts/components/conversation/Timestamp.tsx b/ts/components/conversation/Timestamp.tsx index de7445c9f21f..cb3fa9459d4f 100644 --- a/ts/components/conversation/Timestamp.tsx +++ b/ts/components/conversation/Timestamp.tsx @@ -31,7 +31,7 @@ export class Timestamp extends React.Component { this.interval = null; } - public componentDidMount(): void { + public override componentDidMount(): void { const update = () => { this.setState({ // Used to trigger renders @@ -42,13 +42,13 @@ export class Timestamp extends React.Component { this.interval = setInterval(update, UPDATE_FREQUENCY); } - public componentWillUnmount(): void { + public override componentWillUnmount(): void { if (this.interval) { clearInterval(this.interval); } } - public render(): JSX.Element | null { + public override render(): JSX.Element | null { const { direction, i18n, diff --git a/ts/components/conversation/TypingBubble.tsx b/ts/components/conversation/TypingBubble.tsx index 8f514f009ba0..fd28e0032ed0 100644 --- a/ts/components/conversation/TypingBubble.tsx +++ b/ts/components/conversation/TypingBubble.tsx @@ -66,7 +66,7 @@ export class TypingBubble extends React.PureComponent { ); } - public render(): JSX.Element { + public override render(): JSX.Element { const { i18n, conversationType } = this.props; const isGroup = conversationType === 'group'; diff --git a/ts/components/conversation/VerificationNotification.tsx b/ts/components/conversation/VerificationNotification.tsx index aa3476af5a78..d00d12109f1e 100644 --- a/ts/components/conversation/VerificationNotification.tsx +++ b/ts/components/conversation/VerificationNotification.tsx @@ -61,7 +61,7 @@ export class VerificationNotification extends React.Component { ); } - public render(): JSX.Element { + public override render(): JSX.Element { const { type } = this.props; const icon = type === 'markVerified' ? 'verified' : 'verified-not'; diff --git a/ts/components/conversation/media-gallery/AttachmentSection.tsx b/ts/components/conversation/media-gallery/AttachmentSection.tsx index 1c5b7a37e137..2374c04ed374 100644 --- a/ts/components/conversation/media-gallery/AttachmentSection.tsx +++ b/ts/components/conversation/media-gallery/AttachmentSection.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -20,7 +20,7 @@ export type Props = { }; export class AttachmentSection extends React.Component { - public render(): JSX.Element { + public override render(): JSX.Element { const { header } = this.props; return ( diff --git a/ts/components/conversation/media-gallery/DocumentListItem.tsx b/ts/components/conversation/media-gallery/DocumentListItem.tsx index ef2cfa884534..8a8b65141b22 100644 --- a/ts/components/conversation/media-gallery/DocumentListItem.tsx +++ b/ts/components/conversation/media-gallery/DocumentListItem.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -23,7 +23,7 @@ export class DocumentListItem extends React.Component { shouldShowSeparator: true, }; - public render(): JSX.Element { + public override render(): JSX.Element { const { shouldShowSeparator } = this.props; return ( diff --git a/ts/components/conversation/media-gallery/MediaGallery.tsx b/ts/components/conversation/media-gallery/MediaGallery.tsx index d67b7b332496..ca50d7818418 100644 --- a/ts/components/conversation/media-gallery/MediaGallery.tsx +++ b/ts/components/conversation/media-gallery/MediaGallery.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -78,7 +78,7 @@ export class MediaGallery extends React.Component { }; } - public componentDidMount(): void { + public override componentDidMount(): void { // When this component is created, it's initially not part of the DOM, and then it's // added off-screen and animated in. This ensures that the focus takes. setTimeout(() => { @@ -88,7 +88,7 @@ export class MediaGallery extends React.Component { }); } - public render(): JSX.Element { + public override render(): JSX.Element { const { selectedTab } = this.state; return ( diff --git a/ts/components/conversation/media-gallery/MediaGridItem.tsx b/ts/components/conversation/media-gallery/MediaGridItem.tsx index ecc0e2b01ba8..4d36b5a325a2 100644 --- a/ts/components/conversation/media-gallery/MediaGridItem.tsx +++ b/ts/components/conversation/media-gallery/MediaGridItem.tsx @@ -1,4 +1,4 @@ -// Copyright 2018-2020 Signal Messenger, LLC +// Copyright 2018-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import React from 'react'; @@ -111,7 +111,7 @@ export class MediaGridItem extends React.Component { ); } - public render(): JSX.Element { + public override render(): JSX.Element { const { onClick } = this.props; return ( diff --git a/ts/components/conversationList/MessageBodyHighlight.tsx b/ts/components/conversationList/MessageBodyHighlight.tsx index ae20c78d44d2..2417e790af1c 100644 --- a/ts/components/conversationList/MessageBodyHighlight.tsx +++ b/ts/components/conversationList/MessageBodyHighlight.tsx @@ -137,7 +137,7 @@ export class MessageBodyHighlight extends React.Component { return results; } - public render(): ReactNode { + public override render(): ReactNode { return
{this.renderContents()}
; } } diff --git a/ts/components/leftPane/LeftPaneArchiveHelper.tsx b/ts/components/leftPane/LeftPaneArchiveHelper.tsx index f19a44e50c03..39d9ff152abd 100644 --- a/ts/components/leftPane/LeftPaneArchiveHelper.tsx +++ b/ts/components/leftPane/LeftPaneArchiveHelper.tsx @@ -48,7 +48,7 @@ export class LeftPaneArchiveHelper extends LeftPaneHelper void }): () => void { + override getBackAction({ showInbox }: { showInbox: () => void }): () => void { return showInbox; } - getPreRowsNode({ + override getPreRowsNode({ i18n, }: Readonly<{ i18n: LocalizerType }>): ReactChild | null { if (this.searchHelper) { @@ -130,7 +130,7 @@ export class LeftPaneArchiveHelper extends LeftPaneHelper void; @@ -105,7 +105,7 @@ export class LeftPaneChooseGroupMembersHelper extends LeftPaneHelper void }): () => void { + override getBackAction({ showInbox }: { showInbox: () => void }): () => void { return showInbox; } - getPreRowsNode({ + override getPreRowsNode({ i18n, onChangeComposeSearchTerm, }: Readonly<{ diff --git a/ts/components/leftPane/LeftPaneInboxHelper.tsx b/ts/components/leftPane/LeftPaneInboxHelper.tsx index 5db723f340c9..91e05d0c23d1 100644 --- a/ts/components/leftPane/LeftPaneInboxHelper.tsx +++ b/ts/components/leftPane/LeftPaneInboxHelper.tsx @@ -61,7 +61,7 @@ export class LeftPaneInboxHelper extends LeftPaneHelper ); } - getPreRowsNode({ + override getPreRowsNode({ i18n, }: Readonly<{ i18n: LocalizerType }>): null | ReactChild { if (this.getRowCount() === 0) { @@ -156,7 +156,7 @@ export class LeftPaneInboxHelper extends LeftPaneHelper return undefined; } - getRowIndexToScrollTo( + override getRowIndexToScrollTo( selectedConversationId: undefined | string ): undefined | number { if (!selectedConversationId) { @@ -188,7 +188,7 @@ export class LeftPaneInboxHelper extends LeftPaneHelper return undefined; } - requiresFullWidth(): boolean { + override requiresFullWidth(): boolean { const hasNoConversations = !this.conversations.length && !this.pinnedConversations.length && @@ -228,7 +228,7 @@ export class LeftPaneInboxHelper extends LeftPaneHelper ); } - onKeyDown( + override onKeyDown( event: KeyboardEvent, options: Readonly<{ searchInConversation: (conversationId: string) => unknown; diff --git a/ts/components/leftPane/LeftPaneSearchHelper.tsx b/ts/components/leftPane/LeftPaneSearchHelper.tsx index 683bca16fcd0..ee88c9cc9980 100644 --- a/ts/components/leftPane/LeftPaneSearchHelper.tsx +++ b/ts/components/leftPane/LeftPaneSearchHelper.tsx @@ -77,7 +77,7 @@ export class LeftPaneSearchHelper extends LeftPaneHelper): null | ReactChild { const mightHaveSearchResults = this.allResults().some( @@ -142,7 +142,7 @@ export class LeftPaneSearchHelper extends LeftPaneHelper unknown; diff --git a/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.tsx b/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.tsx index db642bbe1d54..86cb482e0d81 100644 --- a/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.tsx +++ b/ts/components/leftPane/LeftPaneSetGroupMetadataHelper.tsx @@ -75,7 +75,7 @@ export class LeftPaneSetGroupMetadataHelper extends LeftPaneHelper void; @@ -109,7 +109,7 @@ export class LeftPaneSetGroupMetadataHelper extends LeftPaneHelper): PQueue { return this.inMemoryQueues.get(data.conversationId); diff --git a/ts/jobs/reactionJobQueue.ts b/ts/jobs/reactionJobQueue.ts index c4effc28c6be..1d2327882f42 100644 --- a/ts/jobs/reactionJobQueue.ts +++ b/ts/jobs/reactionJobQueue.ts @@ -47,7 +47,7 @@ export class ReactionJobQueue extends JobQueue { return reactionJobData.parse(data); } - protected getInMemoryQueue({ + protected override getInMemoryQueue({ data, }: Readonly<{ data: Pick }>): PQueue { return this.inMemoryQueues.get(data.messageId); diff --git a/ts/models/conversations.ts b/ts/models/conversations.ts index 4349e9b17542..0ef05e7fb8e8 100644 --- a/ts/models/conversations.ts +++ b/ts/models/conversations.ts @@ -203,7 +203,7 @@ export class ConversationModel extends window.Backbone private isInReduxBatch = false; - defaults(): Partial { + override defaults(): Partial { return { unreadCount: 0, verified: window.textsecure.storage.protocol.VerifiedStatus.DEFAULT, @@ -244,7 +244,9 @@ export class ConversationModel extends window.Backbone return collection; } - initialize(attributes: Partial = {}): void { + override initialize( + attributes: Partial = {} + ): void { if (isValidE164(attributes.id, false)) { this.set({ id: UUID.generate().toString(), e164: attributes.id }); } @@ -1078,7 +1080,7 @@ export class ConversationModel extends window.Backbone this.setRegistered(); } - isValid(): boolean { + override isValid(): boolean { return ( isDirectConversation(this.attributes) || isGroupV1(this.attributes) || @@ -2956,7 +2958,7 @@ export class ConversationModel extends window.Backbone ); } - validate(attributes = this.attributes): string | null { + override validate(attributes = this.attributes): string | null { const required = ['type']; const missing = window._.filter(required, attr => !attributes[attr]); if (missing.length) { diff --git a/ts/models/messages.ts b/ts/models/messages.ts index 74120ec96c7f..96977e4bffd1 100644 --- a/ts/models/messages.ts +++ b/ts/models/messages.ts @@ -203,7 +203,7 @@ export class MessageModel extends window.Backbone.Model { cachedOutgoingStickerData?: WhatIsThis; - initialize(attributes: unknown): void { + override initialize(attributes: unknown): void { if (_.isObject(attributes)) { this.set( TypedMessage.initializeSchemaVersion({ @@ -756,14 +756,14 @@ export class MessageModel extends window.Backbone.Model { return `${account}.${device} ${timestamp}`; } - defaults(): Partial { + override defaults(): Partial { return { timestamp: new Date().getTime(), attachments: [], }; } - validate(attributes: Record): void { + override validate(attributes: Record): void { const required = ['conversationId', 'received_at', 'sent_at']; const missing = _.filter(required, attr => !attributes[attr]); if (missing.length) { @@ -1003,7 +1003,7 @@ export class MessageModel extends window.Backbone.Model { await window.Signal.Data.deleteSentProtoByMessageId(this.id); } - isEmpty(): boolean { + override isEmpty(): boolean { const { attributes } = this; // Core message types - we check for all four because they can each stand alone diff --git a/ts/quill/emoji/blot.tsx b/ts/quill/emoji/blot.tsx index 8d70b4277803..ea32a7394018 100644 --- a/ts/quill/emoji/blot.tsx +++ b/ts/quill/emoji/blot.tsx @@ -1,4 +1,4 @@ -// Copyright 2020 Signal Messenger, LLC +// Copyright 2020-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import type Parchment from 'parchment'; @@ -13,13 +13,13 @@ const Embed: typeof Parchment.Embed = Quill.import('blots/embed'); // ts/components/emoji/Emoji.tsx export class EmojiBlot extends Embed { - static blotName = 'emoji'; + static override blotName = 'emoji'; - static tagName = 'img'; + static override tagName = 'img'; - static className = 'emoji-blot'; + static override className = 'emoji-blot'; - static create(emoji: string): Node { + static override create(emoji: string): Node { const node = super.create(undefined) as HTMLElement; node.dataset.emoji = emoji; @@ -33,7 +33,7 @@ export class EmojiBlot extends Embed { return node; } - static value(node: HTMLElement): string | undefined { + static override value(node: HTMLElement): string | undefined { return node.dataset.emoji; } } diff --git a/ts/quill/mentions/blot.tsx b/ts/quill/mentions/blot.tsx index 3a3b8ffc46a4..9d904c7bbb74 100644 --- a/ts/quill/mentions/blot.tsx +++ b/ts/quill/mentions/blot.tsx @@ -1,4 +1,4 @@ -// Copyright 2020 Signal Messenger, LLC +// Copyright 2020-2021 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only /* eslint-disable max-classes-per-file */ @@ -17,13 +17,13 @@ declare class QuillEmbed extends Parchment.Embed { const Embed: typeof QuillEmbed = Quill.import('blots/embed'); export class MentionBlot extends Embed { - static blotName = 'mention'; + static override blotName = 'mention'; - static className = 'mention-blot'; + static override className = 'mention-blot'; - static tagName = 'span'; + static override tagName = 'span'; - static create(value: MentionBlotValue): Node { + static override create(value: MentionBlotValue): Node { const node = super.create(undefined) as HTMLElement; MentionBlot.buildSpan(value, node); @@ -31,7 +31,7 @@ export class MentionBlot extends Embed { return node; } - static value(node: HTMLElement): MentionBlotValue { + static override value(node: HTMLElement): MentionBlotValue { const { uuid, title } = node.dataset; if (uuid === undefined || title === undefined) { throw new Error( diff --git a/ts/test-node/jobs/JobQueue_test.ts b/ts/test-node/jobs/JobQueue_test.ts index dcaa30add2a6..318aa3b1ecd7 100644 --- a/ts/test-node/jobs/JobQueue_test.ts +++ b/ts/test-node/jobs/JobQueue_test.ts @@ -128,7 +128,9 @@ describe('JobQueue', () => { return z.number().parse(data); } - protected getInMemoryQueue(parsedJob: ParsedJob): PQueue { + protected override getInMemoryQueue( + parsedJob: ParsedJob + ): PQueue { assert( new Set([1, 2, 3, 4]).has(parsedJob.data), 'Bad data passed to `getInMemoryQueue`' diff --git a/ts/textsecure/CDSSocket.ts b/ts/textsecure/CDSSocket.ts index a6de405ce7cc..cb878266d720 100644 --- a/ts/textsecure/CDSSocket.ts +++ b/ts/textsecure/CDSSocket.ts @@ -150,13 +150,13 @@ export class CDSSocket extends EventEmitter { // EventEmitter types - public on( + public override on( type: 'close', callback: (code: number, reason?: string) => void ): this; - public on(type: 'error', callback: (error: Error) => void): this; + public override on(type: 'error', callback: (error: Error) => void): this; - public on( + public override on( type: string | symbol, // eslint-disable-next-line @typescript-eslint/no-explicit-any listener: (...args: Array) => void @@ -164,11 +164,11 @@ export class CDSSocket extends EventEmitter { return super.on(type, listener); } - public emit(type: 'close', code: number, reason?: string): boolean; - public emit(type: 'error', error: Error): boolean; + public override emit(type: 'close', code: number, reason?: string): boolean; + public override emit(type: 'error', error: Error): boolean; // eslint-disable-next-line @typescript-eslint/no-explicit-any - public emit(type: string | symbol, ...args: Array): boolean { + public override emit(type: string | symbol, ...args: Array): boolean { return super.emit(type, ...args); } } diff --git a/ts/textsecure/Errors.ts b/ts/textsecure/Errors.ts index 059af813264b..ff7e71913b44 100644 --- a/ts/textsecure/Errors.ts +++ b/ts/textsecure/Errors.ts @@ -18,7 +18,7 @@ export type HTTPErrorHeadersType = { }; export class HTTPError extends Error { - public readonly name = 'HTTPError'; + public override readonly name = 'HTTPError'; public readonly code: number; @@ -48,10 +48,6 @@ export class HTTPError extends Error { } export class ReplayableError extends Error { - name: string; - - message: string; - functionCode?: number; constructor(options: { diff --git a/ts/textsecure/MessageReceiver.ts b/ts/textsecure/MessageReceiver.ts index 0248d8748cbf..989475774be4 100644 --- a/ts/textsecure/MessageReceiver.ts +++ b/ts/textsecure/MessageReceiver.ts @@ -350,134 +350,149 @@ export default class MessageReceiver // EventTarget types // - public addEventListener( + public override addEventListener( name: 'reconnect', handler: (ev: ReconnectEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'empty', handler: (ev: EmptyEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'progress', handler: (ev: ProgressEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'typing', handler: (ev: TypingEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'error', handler: (ev: ErrorEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'delivery', handler: (ev: DeliveryEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'decryption-error', handler: (ev: DecryptionErrorEvent) => void ): void; - public addEventListener(name: 'sent', handler: (ev: SentEvent) => void): void; + public override addEventListener( + name: 'sent', + handler: (ev: SentEvent) => void + ): void; - public addEventListener( + public override addEventListener( name: 'profileKeyUpdate', handler: (ev: ProfileKeyUpdateEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'message', handler: (ev: MessageEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'retry-request', handler: (ev: RetryRequestEvent) => void ): void; - public addEventListener(name: 'read', handler: (ev: ReadEvent) => void): void; + public override addEventListener( + name: 'read', + handler: (ev: ReadEvent) => void + ): void; - public addEventListener(name: 'view', handler: (ev: ViewEvent) => void): void; + public override addEventListener( + name: 'view', + handler: (ev: ViewEvent) => void + ): void; - public addEventListener( + public override addEventListener( name: 'configuration', handler: (ev: ConfigurationEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'viewOnceOpenSync', handler: (ev: ViewOnceOpenSyncEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'messageRequestResponse', handler: (ev: MessageRequestResponseEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'fetchLatest', handler: (ev: FetchLatestEvent) => void ): void; - public addEventListener(name: 'keys', handler: (ev: KeysEvent) => void): void; + public override addEventListener( + name: 'keys', + handler: (ev: KeysEvent) => void + ): void; - public addEventListener( + public override addEventListener( name: 'sticker-pack', handler: (ev: StickerPackEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'verified', handler: (ev: VerifiedEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'readSync', handler: (ev: ReadSyncEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'viewSync', handler: (ev: ViewSyncEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'contact', handler: (ev: ContactEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'contactSync', handler: (ev: ContactSyncEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'group', handler: (ev: GroupEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'groupSync', handler: (ev: GroupSyncEvent) => void ): void; - public addEventListener( + public override addEventListener( name: 'envelope', handler: (ev: EnvelopeEvent) => void ): void; - public addEventListener(name: string, handler: EventHandler): void { + public override addEventListener(name: string, handler: EventHandler): void { return super.addEventListener(name, handler); } - public removeEventListener(name: string, handler: EventHandler): void { + public override removeEventListener( + name: string, + handler: EventHandler + ): void { return super.removeEventListener(name, handler); } diff --git a/ts/textsecure/SocketManager.ts b/ts/textsecure/SocketManager.ts index 7eec562b18db..0fb99e0b3d04 100644 --- a/ts/textsecure/SocketManager.ts +++ b/ts/textsecure/SocketManager.ts @@ -626,10 +626,13 @@ export class SocketManager extends EventListener { // EventEmitter types - public on(type: 'authError', callback: (error: HTTPError) => void): this; - public on(type: 'statusChange', callback: () => void): this; + public override on( + type: 'authError', + callback: (error: HTTPError) => void + ): this; + public override on(type: 'statusChange', callback: () => void): this; - public on( + public override on( type: string | symbol, // eslint-disable-next-line @typescript-eslint/no-explicit-any listener: (...args: Array) => void @@ -637,11 +640,11 @@ export class SocketManager extends EventListener { return super.on(type, listener); } - public emit(type: 'authError', error: HTTPError): boolean; - public emit(type: 'statusChange'): boolean; + public override emit(type: 'authError', error: HTTPError): boolean; + public override emit(type: 'statusChange'): boolean; // eslint-disable-next-line @typescript-eslint/no-explicit-any - public emit(type: string | symbol, ...args: Array): boolean { + public override emit(type: string | symbol, ...args: Array): boolean { return super.emit(type, ...args); } } diff --git a/ts/textsecure/WebsocketResources.ts b/ts/textsecure/WebsocketResources.ts index ce522c755d43..a9e1e48c20c3 100644 --- a/ts/textsecure/WebsocketResources.ts +++ b/ts/textsecure/WebsocketResources.ts @@ -163,12 +163,12 @@ export default class WebSocketResource extends EventTarget { this.addEventListener('close', () => this.onClose()); } - public addEventListener( + public override addEventListener( name: 'close', handler: (ev: CloseEvent) => void ): void; - public addEventListener(name: string, handler: EventHandler): void { + public override addEventListener(name: string, handler: EventHandler): void { return super.addEventListener(name, handler); } diff --git a/ts/views/conversation_view.ts b/ts/views/conversation_view.ts index ae59e72501af..4ff9c79cee77 100644 --- a/ts/views/conversation_view.ts +++ b/ts/views/conversation_view.ts @@ -312,7 +312,7 @@ export class ConversationView extends window.Backbone.View { this.updateAttachmentsView(); } - events(): Record { + override events(): Record { return { drop: 'onDrop', paste: 'onPaste', diff --git a/ts/views/inbox_view.ts b/ts/views/inbox_view.ts index 147907123c40..baac4ef07b18 100644 --- a/ts/views/inbox_view.ts +++ b/ts/views/inbox_view.ts @@ -11,7 +11,7 @@ window.Whisper = window.Whisper || {}; const { Whisper } = window; class ConversationStack extends Backbone.View { - public className = 'conversation-stack'; + public override className = 'conversation-stack'; private conversationStack: Array = []; @@ -59,7 +59,7 @@ class ConversationStack extends Backbone.View { this.render(); } - public render(): ConversationStack { + public override render(): ConversationStack { const isAnyConversationOpen = Boolean(this.conversationStack.length); this.$('.no-conversation-open').toggle(!isAnyConversationOpen); diff --git a/tsconfig.json b/tsconfig.json index d7dce6815839..84062611ab35 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -33,6 +33,7 @@ // Additional Checks "noUnusedLocals": true, // Report errors on unused locals. "noUnusedParameters": true, // Report errors on unused parameters. + "noImplicitOverride": true, // Require explicit "override" keyword in subclasses. "noImplicitReturns": true, // Report error when not all code paths in function return a value. "noFallthroughCasesInSwitch": true, // Report errors for fallthrough cases in switch statement. diff --git a/yarn.lock b/yarn.lock index caf59ea223f7..cd1a4ef81c8f 100644 --- a/yarn.lock +++ b/yarn.lock @@ -21,6 +21,13 @@ dependencies: "@babel/highlight" "^7.12.13" +"@babel/code-frame@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.16.0.tgz#0dfc80309beec8411e65e706461c408b0bb9b431" + integrity sha512-IF4EOMEV+bfYwOmNxGzSnjR2EmQod7f1UXOpZM3l4i4o4QNwzjtJAu/HxdjHq0aYBvdqMuQEY1eg0nqW9ZPORA== + dependencies: + "@babel/highlight" "^7.16.0" + "@babel/compat-data@^7.13.15": version "7.14.0" resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.14.0.tgz#a901128bce2ad02565df95e6ecbf195cf9465919" @@ -76,6 +83,15 @@ jsesc "^2.5.1" source-map "^0.5.0" +"@babel/generator@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.16.0.tgz#d40f3d1d5075e62d3500bccb67f3daa8a95265b2" + integrity sha512-RR8hUCfRQn9j9RPKEVXo9LiwoxLPYn6hNZlvUOR8tSnaxlD0p0+la00ZP9/SnRt6HchKr+X0fO2r8vrETiJGew== + dependencies: + "@babel/types" "^7.16.0" + jsesc "^2.5.1" + source-map "^0.5.0" + "@babel/generator@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.5.5.tgz#873a7f936a3c89491b43536d12245b626664e3cf" @@ -104,12 +120,12 @@ dependencies: "@babel/types" "^7.0.0" -"@babel/helper-annotate-as-pure@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.12.13.tgz#0f58e86dfc4bb3b1fcd7db806570e177d439b6ab" - integrity sha512-7YXfX5wQ5aYM/BOlbSccHDbuXXFPxeoUmfWtz8le2yTkTZc+BxsiEnENFoi2SlmA8ewDkG2LgIMIVzzn2h8kfw== +"@babel/helper-annotate-as-pure@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-annotate-as-pure/-/helper-annotate-as-pure-7.16.0.tgz#9a1f0ebcda53d9a2d00108c4ceace6a5d5f1f08d" + integrity sha512-ItmYF9vR4zA8cByDocY05o0LGUkp1zhbTQOH1NFyl5xXEqlTJQCEJjieriw+aFpxo16swMxUnUiKS7a/r4vtHg== dependencies: - "@babel/types" "^7.12.13" + "@babel/types" "^7.16.0" "@babel/helper-builder-binary-assignment-operator-visitor@^7.1.0": version "7.1.0" @@ -154,17 +170,17 @@ browserslist "^4.14.5" semver "^6.3.0" -"@babel/helper-create-class-features-plugin@^7.14.3": - version "7.14.3" - resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.14.3.tgz#832111bcf4f57ca57a4c5b1a000fc125abc6554a" - integrity sha512-BnEfi5+6J2Lte9LeiL6TxLWdIlEv9Woacc1qXzXBgbikcOzMRM2Oya5XGg/f/ngotv1ej2A/b+3iJH8wbS1+lQ== +"@babel/helper-create-class-features-plugin@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-create-class-features-plugin/-/helper-create-class-features-plugin-7.16.0.tgz#090d4d166b342a03a9fec37ef4fd5aeb9c7c6a4b" + integrity sha512-XLwWvqEaq19zFlF5PTgOod4bUA+XbkR4WLQBct1bkzmxJGB0ZEJaoKF4c8cgH9oBtCDuYJ8BP5NB9uFiEgO5QA== dependencies: - "@babel/helper-annotate-as-pure" "^7.12.13" - "@babel/helper-function-name" "^7.14.2" - "@babel/helper-member-expression-to-functions" "^7.13.12" - "@babel/helper-optimise-call-expression" "^7.12.13" - "@babel/helper-replace-supers" "^7.14.3" - "@babel/helper-split-export-declaration" "^7.12.13" + "@babel/helper-annotate-as-pure" "^7.16.0" + "@babel/helper-function-name" "^7.16.0" + "@babel/helper-member-expression-to-functions" "^7.16.0" + "@babel/helper-optimise-call-expression" "^7.16.0" + "@babel/helper-replace-supers" "^7.16.0" + "@babel/helper-split-export-declaration" "^7.16.0" "@babel/helper-create-class-features-plugin@^7.4.4", "@babel/helper-create-class-features-plugin@^7.5.5": version "7.5.5" @@ -225,6 +241,15 @@ "@babel/template" "^7.12.13" "@babel/types" "^7.14.2" +"@babel/helper-function-name@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.16.0.tgz#b7dd0797d00bbfee4f07e9c4ea5b0e30c8bb1481" + integrity sha512-BZh4mEk1xi2h4HFjWUXRQX5AEx4rvaZxHgax9gcjdLWdkjsY7MKt5p0otjsg5noXw+pB+clMCjw+aEVYADMjog== + dependencies: + "@babel/helper-get-function-arity" "^7.16.0" + "@babel/template" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/helper-function-name@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.7.4.tgz#ab6e041e7135d436d8f0a3eca15de5b67a341a2e" @@ -248,6 +273,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-get-function-arity@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.16.0.tgz#0088c7486b29a9cb5d948b1a1de46db66e089cfa" + integrity sha512-ASCquNcywC1NkYh/z7Cgp3w31YW8aojjYIlNg4VeJiHkqyP4AzIvr4qx7pYDb4/s8YcsZWqqOSxgkvjUz1kpDQ== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-get-function-arity@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-get-function-arity/-/helper-get-function-arity-7.7.4.tgz#cb46348d2f8808e632f0ab048172130e636005f0" @@ -255,6 +287,13 @@ dependencies: "@babel/types" "^7.7.4" +"@babel/helper-hoist-variables@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.16.0.tgz#4c9023c2f1def7e28ff46fc1dbcd36a39beaa81a" + integrity sha512-1AZlpazjUR0EQZQv3sgRNfM9mEVWPK3M6vlalczA+EECcPz3XPh6VplbErL5UoMpChhSck5wAJHthlj1bYpcmg== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-hoist-variables@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.4.4.tgz#0298b5f25c8c09c53102d52ac4a98f773eb2850a" @@ -269,6 +308,13 @@ dependencies: "@babel/types" "^7.13.12" +"@babel/helper-member-expression-to-functions@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.16.0.tgz#29287040efd197c77636ef75188e81da8bccd5a4" + integrity sha512-bsjlBFPuWT6IWhl28EdrQ+gTvSvj5tqVP5Xeftp07SEuz5pLnsXZuDkDD3Rfcxy0IsHmbZ+7B2/9SHzxO0T+sQ== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-member-expression-to-functions@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-member-expression-to-functions/-/helper-member-expression-to-functions-7.5.5.tgz#1fb5b8ec4453a93c439ee9fe3aeea4a84b76b590" @@ -344,6 +390,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-optimise-call-expression@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.16.0.tgz#cecdb145d70c54096b1564f8e9f10cd7d193b338" + integrity sha512-SuI467Gi2V8fkofm2JPnZzB/SUuXoJA5zXe/xzyPP2M04686RzFKFHPK6HDVN6JvWBIEW8tt9hPR7fXdn2Lgpw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-optimise-call-expression@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/helper-optimise-call-expression/-/helper-optimise-call-expression-7.7.4.tgz#034af31370d2995242aa4df402c3b7794b2dcdf2" @@ -356,7 +409,7 @@ resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.0.0.tgz#bbb3fbee98661c569034237cc03967ba99b4f250" integrity sha512-CYAOUCARwExnEixLdB6sDm2dIJ/YgEAKDM1MOeMeZu9Ld/bDgVo8aiWrXwcY7OBh+1Ea2uUcVRcxKk0GJvW7QA== -"@babel/helper-plugin-utils@^7.12.13", "@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": +"@babel/helper-plugin-utils@^7.13.0", "@babel/helper-plugin-utils@^7.8.0": version "7.13.0" resolved "https://registry.yarnpkg.com/@babel/helper-plugin-utils/-/helper-plugin-utils-7.13.0.tgz#806526ce125aed03373bc416a828321e3a6a33af" integrity sha512-ZPafIPSwzUlAoWT8DKs1W2VyF2gOWthGd5NGFMsBcMMol+ZhK+EQY/e6V96poa6PA/Bh+C9plWN0hXO1uB8AfQ== @@ -389,7 +442,7 @@ "@babel/traverse" "^7.1.0" "@babel/types" "^7.0.0" -"@babel/helper-replace-supers@^7.13.12", "@babel/helper-replace-supers@^7.14.3": +"@babel/helper-replace-supers@^7.13.12": version "7.14.3" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.14.3.tgz#ca17b318b859d107f0e9b722d58cf12d94436600" integrity sha512-Rlh8qEWZSTfdz+tgNV/N4gz1a0TMNwCUcENhMjHTHKp3LseYH5Jha0NSlyTQWMnjbYcwFt+bqAMqSLHVXkQ6UA== @@ -399,6 +452,16 @@ "@babel/traverse" "^7.14.2" "@babel/types" "^7.14.2" +"@babel/helper-replace-supers@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.16.0.tgz#73055e8d3cf9bcba8ddb55cad93fedc860f68f17" + integrity sha512-TQxuQfSCdoha7cpRNJvfaYxxxzmbxXw/+6cS7V02eeDYyhxderSoMVALvwupA54/pZcOTtVeJ0xccp1nGWladA== + dependencies: + "@babel/helper-member-expression-to-functions" "^7.16.0" + "@babel/helper-optimise-call-expression" "^7.16.0" + "@babel/traverse" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/helper-replace-supers@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/helper-replace-supers/-/helper-replace-supers-7.5.5.tgz#f84ce43df031222d2bad068d2626cb5799c34bc2" @@ -448,6 +511,13 @@ dependencies: "@babel/types" "^7.12.13" +"@babel/helper-split-export-declaration@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.16.0.tgz#29672f43663e936df370aaeb22beddb3baec7438" + integrity sha512-0YMMRpuDFNGTHNRiiqJX19GjNXA4H0E8jZ2ibccfSxaCogbm3am5WN/2nQNj0YnQwGWM1J06GOcQ2qnh3+0paw== + dependencies: + "@babel/types" "^7.16.0" + "@babel/helper-split-export-declaration@^7.4.4": version "7.4.4" resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.4.4.tgz#ff94894a340be78f53f06af038b205c49d993677" @@ -472,11 +542,21 @@ resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.14.0.tgz#d26cad8a47c65286b15df1547319a5d0bcf27288" integrity sha512-V3ts7zMSu5lfiwWDVWzRDGIN+lnCEUdaXgtVHJgLb1rGaA6jMrtB9EmE7L18foXJIE8Un/A/h6NJfGQp/e1J4A== +"@babel/helper-validator-identifier@^7.15.7": + version "7.15.7" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" + integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== + "@babel/helper-validator-option@^7.12.17": version "7.12.17" resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.12.17.tgz#d1fbf012e1a79b7eebbfdc6d270baaf8d9eb9831" integrity sha512-TopkMDmLzq8ngChwRlyjR6raKD6gMSae4JdYDB8bByKreQgG0RBTuKe9LRxW3wFtUnjxOPRKBDwEH6Mg5KeDfw== +"@babel/helper-validator-option@^7.14.5": + version "7.14.5" + resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.14.5.tgz#6e72a1fff18d5dfcb878e1e62f1a021c4b72d5a3" + integrity sha512-OX8D5eeX4XwcroVW45NMvoYaIuFI+GQpA2a8Gi+X/U/cDUIRsV37qQfF905F0htTRCREQIB4KqPeaveRJUl3Ow== + "@babel/helper-wrap-function@^7.1.0": version "7.2.0" resolved "https://registry.yarnpkg.com/@babel/helper-wrap-function/-/helper-wrap-function-7.2.0.tgz#c4e0012445769e2815b55296ead43a958549f6fa" @@ -523,11 +603,25 @@ chalk "^2.0.0" js-tokens "^4.0.0" +"@babel/highlight@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.16.0.tgz#6ceb32b2ca4b8f5f361fb7fd821e3fddf4a1725a" + integrity sha512-t8MH41kUQylBtu2+4IQA3atqevA2lRgqA2wyVB/YiWmsDSuylZZuXOUy9ric30hfzauEFfdsuk/eXTRrGrfd0g== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + chalk "^2.0.0" + js-tokens "^4.0.0" + "@babel/parser@^7.12.13", "@babel/parser@^7.14.2", "@babel/parser@^7.14.3": version "7.14.3" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.14.3.tgz#9b530eecb071fd0c93519df25c5ff9f14759f298" integrity sha512-7MpZDIfI7sUC5zWo2+foJ50CSI5lcqDehZ0lVgIhSi4bFEk94fLAKlF3Q0nzSQQ+ca0lm+O6G9ztKVBeu8PMRQ== +"@babel/parser@^7.16.0", "@babel/parser@^7.16.3": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.16.3.tgz#271bafcb811080905a119222edbc17909c82261d" + integrity sha512-dcNwU1O4sx57ClvLBVFbEgx0UZWfd0JQX5X6fxFRCLHelFBGXFfSz6Y0FAq2PEwUqlqLkdVjVr4VASEOuUnLJw== + "@babel/parser@^7.4.4", "@babel/parser@^7.5.5": version "7.5.5" resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.5.5.tgz#02f077ac8817d3df4a832ef59de67565e71cca4b" @@ -707,12 +801,12 @@ dependencies: "@babel/helper-plugin-utils" "^7.8.0" -"@babel/plugin-syntax-typescript@^7.12.13": - version "7.12.13" - resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.12.13.tgz#9dff111ca64154cef0f4dc52cf843d9f12ce4474" - integrity sha512-cHP3u1JiUiG2LFDKbXnwVad81GvfyIOmCD6HIEId6ojrY0Drfy2q1jw7BwN7dE84+kTnBjLkXoL3IEy/3JPu2w== +"@babel/plugin-syntax-typescript@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.16.0.tgz#2feeb13d9334cc582ea9111d3506f773174179bb" + integrity sha512-Xv6mEXqVdaqCBfJFyeab0fH2DnUoMsDmhamxsSi4j8nLd4Vtw213WMJr55xxqipC/YVWyPY3K0blJncPYji+dQ== dependencies: - "@babel/helper-plugin-utils" "^7.12.13" + "@babel/helper-plugin-utils" "^7.14.5" "@babel/plugin-syntax-typescript@^7.2.0": version "7.3.3" @@ -1058,14 +1152,14 @@ dependencies: "@babel/helper-plugin-utils" "^7.0.0" -"@babel/plugin-transform-typescript@^7.13.0": - version "7.14.3" - resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.14.3.tgz#44f67f725a60cccee33d9d6fee5e4f338258f34f" - integrity sha512-G5Bb5pY6tJRTC4ag1visSgiDoGgJ1u1fMUgmc2ijLkcIdzP83Q1qyZX4ggFQ/SkR+PNOatkaYC+nKcTlpsX4ag== +"@babel/plugin-transform-typescript@^7.16.0": + version "7.16.1" + resolved "https://registry.yarnpkg.com/@babel/plugin-transform-typescript/-/plugin-transform-typescript-7.16.1.tgz#cc0670b2822b0338355bc1b3d2246a42b8166409" + integrity sha512-NO4XoryBng06jjw/qWEU2LhcLJr1tWkhpMam/H4eas/CDKMX/b2/Ylb6EI256Y7+FVPCawwSM1rrJNOpDiz+Lg== dependencies: - "@babel/helper-create-class-features-plugin" "^7.14.3" - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/plugin-syntax-typescript" "^7.12.13" + "@babel/helper-create-class-features-plugin" "^7.16.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/plugin-syntax-typescript" "^7.16.0" "@babel/plugin-transform-typescript@^7.3.2": version "7.5.5" @@ -1171,14 +1265,14 @@ "@babel/plugin-transform-react-jsx-self" "^7.7.4" "@babel/plugin-transform-react-jsx-source" "^7.7.4" -"@babel/preset-typescript@7.13.0": - version "7.13.0" - resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.13.0.tgz#ab107e5f050609d806fbb039bec553b33462c60a" - integrity sha512-LXJwxrHy0N3f6gIJlYbLta1D9BDtHpQeqwzM0LIfjDlr6UE/D5Mc7W4iDiQzaE+ks0sTjT26ArcHWnJVt0QiHw== +"@babel/preset-typescript@7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/preset-typescript/-/preset-typescript-7.16.0.tgz#b0b4f105b855fb3d631ec036cdc9d1ffd1fa5eac" + integrity sha512-txegdrZYgO9DlPbv+9QOVpMnKbOtezsLHWsnsRF4AjbSIsVaujrq1qg8HK0mxQpWv0jnejt0yEoW1uWpvbrDTg== dependencies: - "@babel/helper-plugin-utils" "^7.13.0" - "@babel/helper-validator-option" "^7.12.17" - "@babel/plugin-transform-typescript" "^7.13.0" + "@babel/helper-plugin-utils" "^7.14.5" + "@babel/helper-validator-option" "^7.14.5" + "@babel/plugin-transform-typescript" "^7.16.0" "@babel/preset-typescript@7.3.3": version "7.3.3" @@ -1249,6 +1343,15 @@ "@babel/parser" "^7.12.13" "@babel/types" "^7.12.13" +"@babel/template@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.16.0.tgz#d16a35ebf4cd74e202083356fab21dd89363ddd6" + integrity sha512-MnZdpFD/ZdYhXwiunMqqgyZyucaYsbL0IrjoGjaVhGilz+x8YB++kRfygSOIj1yOtWKPlx7NBp+9I1RQSgsd5A== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/parser" "^7.16.0" + "@babel/types" "^7.16.0" + "@babel/template@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.7.4.tgz#428a7d9eecffe27deac0a98e23bf8e3675d2a77b" @@ -1287,6 +1390,21 @@ debug "^4.1.0" globals "^11.1.0" +"@babel/traverse@^7.16.0": + version "7.16.3" + resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.16.3.tgz#f63e8a938cc1b780f66d9ed3c54f532ca2d14787" + integrity sha512-eolumr1vVMjqevCpwVO99yN/LoGL0EyHiLO5I043aYQvwOJ9eR5UsZSClHVCzfhBduMAsSzgA/6AyqPjNayJag== + dependencies: + "@babel/code-frame" "^7.16.0" + "@babel/generator" "^7.16.0" + "@babel/helper-function-name" "^7.16.0" + "@babel/helper-hoist-variables" "^7.16.0" + "@babel/helper-split-export-declaration" "^7.16.0" + "@babel/parser" "^7.16.3" + "@babel/types" "^7.16.0" + debug "^4.1.0" + globals "^11.1.0" + "@babel/traverse@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.7.4.tgz#9c1e7c60fb679fe4fcfaa42500833333c2058558" @@ -1328,6 +1446,14 @@ "@babel/helper-validator-identifier" "^7.14.0" to-fast-properties "^2.0.0" +"@babel/types@^7.16.0": + version "7.16.0" + resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.16.0.tgz#db3b313804f96aadd0b776c4823e127ad67289ba" + integrity sha512-PJgg/k3SdLsGb3hhisFvtLOw5ts113klrpLuIPtCJIU+BB24fqq6lf8RWqKJEjzqXR9AEH1rIb5XTqwBHB+kQg== + dependencies: + "@babel/helper-validator-identifier" "^7.15.7" + to-fast-properties "^2.0.0" + "@babel/types@^7.7.4": version "7.7.4" resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.7.4.tgz#516570d539e44ddf308c07569c258ff94fde9193"