diff --git a/ts/quill/mentions/completion.tsx b/ts/quill/mentions/completion.tsx index 7335745b27c6..7e6652f1886b 100644 --- a/ts/quill/mentions/completion.tsx +++ b/ts/quill/mentions/completion.tsx @@ -1,4 +1,4 @@ -// Copyright 2020-2021 Signal Messenger, LLC +// Copyright 2020-2022 Signal Messenger, LLC // SPDX-License-Identifier: AGPL-3.0-only import _ from 'lodash'; @@ -27,15 +27,6 @@ export type MentionCompletionOptions = { theme: ThemeType; }; -declare global { - // We want to extend `HTMLElement`'s properties, so we need an interface. - // eslint-disable-next-line no-restricted-syntax - interface HTMLElement { - // Webkit-specific - scrollIntoViewIfNeeded: (bringToCenter: boolean) => void; - } -} - const MENTION_REGEX = /(?:^|\W)@([-+\w]*)$/; export class MentionCompletion { diff --git a/ts/window.d.ts b/ts/window.d.ts index 80cd1773eb58..481f86857b18 100644 --- a/ts/window.d.ts +++ b/ts/window.d.ts @@ -498,6 +498,13 @@ declare global { stackForLog?: string; } + // We want to extend `Element`'s properties, so we need an interface. + // eslint-disable-next-line no-restricted-syntax + interface Element { + // WebKit-specific + scrollIntoViewIfNeeded: (bringToCenter?: boolean) => void; + } + // Uint8Array and ArrayBuffer are type-compatible in TypeScript's covariant // type checker, but in reality they are not. Let's assert correct use! interface Uint8Array {