Merge pull request #18941 from overleaf/jpa-fix-some-ts-ignore

[web] fix a few ts-ignore statements

GitOrigin-RevId: 447a070a8268cffa6ef298b0fe158232c3f6fe8f
This commit is contained in:
Jakob Ackermann 2024-06-18 11:22:16 +02:00 committed by Copybot
parent aa7839876a
commit 4087345a2a
6 changed files with 32 additions and 6 deletions

24
package-lock.json generated
View file

@ -13028,6 +13028,16 @@
"@types/react": "*" "@types/react": "*"
} }
}, },
"node_modules/@types/react-overlays": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@types/react-overlays/-/react-overlays-1.1.3.tgz",
"integrity": "sha512-oOq5NWbyfNz2w2sKvjkHdvGQSMA+VDVfI5UOfGPR0wkik2welad1RDVnVgH15jKf58jrZNBa1Ee4SVBgCGFxCg==",
"dev": true,
"dependencies": {
"@types/react": "*",
"@types/react-transition-group": "*"
}
},
"node_modules/@types/react-transition-group": { "node_modules/@types/react-transition-group": {
"version": "4.4.10", "version": "4.4.10",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz",
@ -44705,6 +44715,7 @@
"@types/react-dom": "^17.0.13", "@types/react-dom": "^17.0.13",
"@types/react-google-recaptcha": "^2.1.5", "@types/react-google-recaptcha": "^2.1.5",
"@types/react-linkify": "^1.0.0", "@types/react-linkify": "^1.0.0",
"@types/react-overlays": "^1.1.3",
"@types/recurly__recurly-js": "^4.22.0", "@types/recurly__recurly-js": "^4.22.0",
"@types/sinon-chai": "^3.2.8", "@types/sinon-chai": "^3.2.8",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
@ -44797,6 +44808,7 @@
"react-google-recaptcha": "^3.1.0", "react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.3.1", "react-i18next": "^13.3.1",
"react-linkify": "^1.0.0-alpha", "react-linkify": "^1.0.0-alpha",
"react-overlays": "^0.9.3",
"react-refresh": "^0.14.0", "react-refresh": "^0.14.0",
"react-resizable-panels": "^1.0.3", "react-resizable-panels": "^1.0.3",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",
@ -53156,6 +53168,7 @@
"@types/react-dom": "^17.0.13", "@types/react-dom": "^17.0.13",
"@types/react-google-recaptcha": "^2.1.5", "@types/react-google-recaptcha": "^2.1.5",
"@types/react-linkify": "^1.0.0", "@types/react-linkify": "^1.0.0",
"@types/react-overlays": "^1.1.3",
"@types/recurly__recurly-js": "^4.22.0", "@types/recurly__recurly-js": "^4.22.0",
"@types/sinon-chai": "^3.2.8", "@types/sinon-chai": "^3.2.8",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
@ -53318,6 +53331,7 @@
"react-google-recaptcha": "^3.1.0", "react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.3.1", "react-i18next": "^13.3.1",
"react-linkify": "^1.0.0-alpha", "react-linkify": "^1.0.0-alpha",
"react-overlays": "^0.9.3",
"react-refresh": "^0.14.0", "react-refresh": "^0.14.0",
"react-resizable-panels": "^1.0.3", "react-resizable-panels": "^1.0.3",
"recurly": "^4.0.0", "recurly": "^4.0.0",
@ -57876,6 +57890,16 @@
"@types/react": "*" "@types/react": "*"
} }
}, },
"@types/react-overlays": {
"version": "1.1.3",
"resolved": "https://registry.npmjs.org/@types/react-overlays/-/react-overlays-1.1.3.tgz",
"integrity": "sha512-oOq5NWbyfNz2w2sKvjkHdvGQSMA+VDVfI5UOfGPR0wkik2welad1RDVnVgH15jKf58jrZNBa1Ee4SVBgCGFxCg==",
"dev": true,
"requires": {
"@types/react": "*",
"@types/react-transition-group": "*"
}
},
"@types/react-transition-group": { "@types/react-transition-group": {
"version": "4.4.10", "version": "4.4.10",
"resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz", "resolved": "https://registry.npmjs.org/@types/react-transition-group/-/react-transition-group-4.4.10.tgz",

View file

@ -23,6 +23,10 @@ export type Socket = {
socket: { socket: {
connected: boolean connected: boolean
connect(): void connect(): void
sessionid: string
transport?: {
name: string
}
} }
disconnect(): void disconnect(): void
} }

View file

@ -110,9 +110,7 @@ export const IdeReactProvider: FC = ({ children }) => {
...meta, ...meta,
user_id: getMeta('ol-user_id'), user_id: getMeta('ol-user_id'),
project_id: projectId, project_id: projectId,
// @ts-ignore
client_id: socket.socket?.sessionid, client_id: socket.socket?.sessionid,
// @ts-ignore
transport: socket.socket?.transport?.name, transport: socket.socket?.transport?.name,
client_now: new Date(), client_now: new Date(),
release, release,

View file

@ -1,4 +1,3 @@
// @ts-ignore
import { generateSHA1Hash } from '../../../shared/utils/sha1' import { generateSHA1Hash } from '../../../shared/utils/sha1'
import { import {
createContext, createContext,

View file

@ -1,7 +1,5 @@
import { forwardRef } from 'react' import { forwardRef, SyntheticEvent } from 'react'
import classnames from 'classnames' import classnames from 'classnames'
// @ts-ignore
// eslint-disable-next-line import/no-extraneous-dependencies
import RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper' import RootCloseWrapper from 'react-overlays/lib/RootCloseWrapper'
import { DropdownProps } from 'react-bootstrap' import { DropdownProps } from 'react-bootstrap'
import { MergeAndOverride } from '../../../../../types/utils' import { MergeAndOverride } from '../../../../../types/utils'
@ -16,6 +14,7 @@ type DropdownMenuWithRefProps = MergeAndOverride<
// The props below are passed by react-bootstrap // The props below are passed by react-bootstrap
labelledBy?: string | undefined labelledBy?: string | undefined
rootCloseEvent?: 'click' | 'mousedown' | undefined rootCloseEvent?: 'click' | 'mousedown' | undefined
onClose?: (e: SyntheticEvent<any>) => void
} }
> >

View file

@ -244,6 +244,7 @@
"@types/react-dom": "^17.0.13", "@types/react-dom": "^17.0.13",
"@types/react-google-recaptcha": "^2.1.5", "@types/react-google-recaptcha": "^2.1.5",
"@types/react-linkify": "^1.0.0", "@types/react-linkify": "^1.0.0",
"@types/react-overlays": "^1.1.3",
"@types/recurly__recurly-js": "^4.22.0", "@types/recurly__recurly-js": "^4.22.0",
"@types/sinon-chai": "^3.2.8", "@types/sinon-chai": "^3.2.8",
"@types/uuid": "^9.0.8", "@types/uuid": "^9.0.8",
@ -336,6 +337,7 @@
"react-google-recaptcha": "^3.1.0", "react-google-recaptcha": "^3.1.0",
"react-i18next": "^13.3.1", "react-i18next": "^13.3.1",
"react-linkify": "^1.0.0-alpha", "react-linkify": "^1.0.0-alpha",
"react-overlays": "^0.9.3",
"react-refresh": "^0.14.0", "react-refresh": "^0.14.0",
"react-resizable-panels": "^1.0.3", "react-resizable-panels": "^1.0.3",
"requirejs": "^2.3.6", "requirejs": "^2.3.6",