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

Commit

Permalink
Update dependency typescript to v5.4.2 (#12324)
Browse files Browse the repository at this point in the history
* Update dependency typescript to v5.4.2

* Fix type conflicts

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

* Make tsc happier

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

---------

Signed-off-by: Michael Telatynski <7t3chguy@gmail.com>
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Michael Telatynski <7t3chguy@gmail.com>
  • Loading branch information
renovate[bot] and t3chguy committed Mar 19, 2024
1 parent 9c78b35 commit 665605b
Show file tree
Hide file tree
Showing 6 changed files with 15 additions and 14 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@
"stylelint-config-standard": "^36.0.0",
"stylelint-scss": "^6.0.0",
"ts-node": "^10.9.1",
"typescript": "5.3.3"
"typescript": "5.4.2"
},
"peerDependencies": {
"postcss": "^8.4.19",
Expand Down
7 changes: 7 additions & 0 deletions playwright/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,3 +31,10 @@ declare global {
matrixcs: typeof Matrix;
}
}

// Workaround for lack of strict mode not resolving complex types correctly
declare module "matrix-js-sdk/src/http-api/index.ts" {
interface UploadResponse {
json(): Promise<object>;
}
}
6 changes: 0 additions & 6 deletions src/@types/global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -151,16 +151,10 @@ declare global {

interface HTMLAudioElement {
type?: string;
// sinkId & setSinkId are experimental and typescript doesn't know about them
sinkId: string;
setSinkId(outputId: string): void;
}

interface HTMLVideoElement {
type?: string;
// sinkId & setSinkId are experimental and typescript doesn't know about them
sinkId: string;
setSinkId(outputId: string): void;
}

// Add Chrome-specific `instant` ScrollBehaviour
Expand Down
2 changes: 1 addition & 1 deletion src/components/views/dialogs/devtools/BaseTool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ const BaseTool: React.FC<XOR<IMinProps, IProps>> = ({
let actionButton: ReactNode = null;
if (message) {
children = message;
} else if (onAction) {
} else if (onAction && actionLabel) {
const onActionClick = (): void => {
onAction().then((msg) => {
if (typeof msg === "string") {
Expand Down
4 changes: 2 additions & 2 deletions src/components/views/settings/account/PhoneNumbers.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ limitations under the License.
*/

import React from "react";
import { ThreepidMedium } from "matrix-js-sdk/src/matrix";
import { IAuthData, ThreepidMedium } from "matrix-js-sdk/src/matrix";
import { logger } from "matrix-js-sdk/src/logger";

import { _t, UserFriendlyError } from "../../../../languageHandler";
Expand Down Expand Up @@ -216,7 +216,7 @@ export default class PhoneNumbers extends React.Component<IProps, IState> {
const address = this.state.verifyMsisdn;
this.state.addTask
?.haveMsisdnToken(token)
.then(([finished] = []) => {
.then(([finished]: [success?: boolean, result?: IAuthData | Error | null] = []) => {
let newPhoneNumber = this.state.newPhoneNumber;
if (finished !== false) {
const msisdns = [...this.props.msisdns, { address, medium: ThreepidMedium.Phone }];
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9154,10 +9154,10 @@ typed-array-length@^1.0.4, typed-array-length@^1.0.5:
is-typed-array "^1.1.13"
possible-typed-array-names "^1.0.0"

typescript@5.3.3:
version "5.3.3"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.3.3.tgz#b3ce6ba258e72e6305ba66f5c9b452aaee3ffe37"
integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==
typescript@5.4.2:
version "5.4.2"
resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.4.2.tgz#0ae9cebcfae970718474fe0da2c090cad6577372"
integrity sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==

ua-parser-js@^1.0.2:
version "1.0.37"
Expand Down

0 comments on commit 665605b

Please sign in to comment.