Skip to content
This repository has been archived by the owner on Sep 11, 2024. It is now read-only.

Commit

Permalink
Merge pull request #6243 from matrix-org/t3chguy/ts/8
Browse files Browse the repository at this point in the history
  • Loading branch information
t3chguy authored Jun 29, 2021
2 parents 9d6d8fc + a59e94b commit 3fa89f3
Show file tree
Hide file tree
Showing 14 changed files with 1,006 additions and 878 deletions.
14 changes: 14 additions & 0 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ limitations under the License.

import "matrix-js-sdk/src/@types/global"; // load matrix-js-sdk's type extensions first
import * as ModernizrStatic from "modernizr";

import ContentMessages from "../ContentMessages";
import { IMatrixClientPeg } from "../MatrixClientPeg";
import ToastStore from "../stores/ToastStore";
Expand Down Expand Up @@ -127,11 +128,24 @@ declare global {
setSinkId(outputId: string);
}

// Add Chrome-specific `instant` ScrollBehaviour
type _ScrollBehavior = ScrollBehavior | "instant";

interface _ScrollOptions {
behavior?: _ScrollBehavior;
}

interface _ScrollIntoViewOptions extends _ScrollOptions {
block?: ScrollLogicalPosition;
inline?: ScrollLogicalPosition;
}

interface Element {
// Safari & IE11 only have this prefixed: we used prefixed versions
// previously so let's continue to support them for now
webkitRequestFullScreen(options?: FullscreenOptions): Promise<void>;
msRequestFullscreen(options?: FullscreenOptions): Promise<void>;
scrollIntoView(arg?: boolean | _ScrollIntoViewOptions): void;
}

interface Error {
Expand Down
8 changes: 4 additions & 4 deletions src/components/structures/AutoHideScrollbar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ See the License for the specific language governing permissions and
limitations under the License.
*/

import React, { HTMLAttributes } from "react";
import React, { HTMLAttributes, WheelEvent } from "react";

interface IProps extends HTMLAttributes<HTMLDivElement> {
interface IProps extends Omit<HTMLAttributes<HTMLDivElement>, "onScroll"> {
className?: string;
onScroll?: () => void;
onWheel?: () => void;
onScroll?: (event: Event) => void;
onWheel?: (event: WheelEvent) => void;
style?: React.CSSProperties
tabIndex?: number,
wrappedRef?: (ref: HTMLDivElement) => void;
Expand Down
Loading

0 comments on commit 3fa89f3

Please sign in to comment.