Upgrade target to es2022 (#12852)

* Upgrade target to es2021

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Upgrade to es2022

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix babel config

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix React contexts

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix types

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Fix React state

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

* Iterate

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
This commit is contained in:
Michael Telatynski 2024-08-01 17:14:28 +01:00 committed by GitHub
parent 9cd0c247a2
commit c1d4199b02
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
68 changed files with 86 additions and 148 deletions

View file

@ -36,7 +36,7 @@ interface IProps {
export default class BridgeSettingsTab extends React.Component<IProps> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
private renderBridgeCard(event: MatrixEvent, room: Room | null): ReactNode {
const content = event.getContent();

View file

@ -42,7 +42,7 @@ interface IState {
export default class GeneralRoomSettingsTab extends React.Component<IProps, IState> {
public static contextType = MatrixClientContext;
public context!: ContextType<typeof MatrixClientContext>;
public declare context: ContextType<typeof MatrixClientContext>;
public constructor(props: IProps, context: ContextType<typeof MatrixClientContext>) {
super(props, context);

View file

@ -50,7 +50,7 @@ export default class NotificationsSettingsTab extends React.Component<IProps, IS
private soundUpload = createRef<HTMLInputElement>();
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
public constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
super(props, context);

View file

@ -89,7 +89,7 @@ interface IBannedUserProps {
export class BannedUser extends React.Component<IBannedUserProps> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
private onUnbanClick = (): void => {
this.context.unban(this.props.member.roomId, this.props.member.userId).catch((err) => {
@ -137,7 +137,7 @@ interface IProps {
export default class RolesRoomSettingsTab extends React.Component<IProps> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
public componentDidMount(): void {
this.context.on(RoomStateEvent.Update, this.onRoomStateUpdate);

View file

@ -67,7 +67,7 @@ interface IState {
export default class SecurityRoomSettingsTab extends React.Component<IProps, IState> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
public constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
super(props, context);

View file

@ -40,7 +40,7 @@ interface IState {
export default class HelpUserSettingsTab extends React.Component<IProps, IState> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
public constructor(props: IProps, context: React.ContextType<typeof MatrixClientContext>) {
super(props, context);

View file

@ -59,7 +59,7 @@ const mapDeviceKindToHandlerValue = (deviceKind: MediaDeviceKindEnum): string |
export default class VoiceUserSettingsTab extends React.Component<{}, IState> {
public static contextType = MatrixClientContext;
public context!: React.ContextType<typeof MatrixClientContext>;
public declare context: React.ContextType<typeof MatrixClientContext>;
public constructor(props: {}, context: React.ContextType<typeof MatrixClientContext>) {
super(props, context);