Skip to content

Commit

Permalink
chore(xo-core): update NoVnc typescript type (#7900)
Browse files Browse the repository at this point in the history
Use type definitions from DefinitelyTyped instead of using custom declaration
  • Loading branch information
OlivierFL authored Aug 9, 2024
1 parent 06af045 commit 700149d
Show file tree
Hide file tree
Showing 6 changed files with 8 additions and 350 deletions.
1 change: 1 addition & 0 deletions @xen-orchestra/lite/env.d.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/// <reference types="vite/client" />
/// <reference types="json-rpc-2.0/dist" />
/// <reference types="vite-plugin-pages/client" />
/// <reference types="novnc__novnc" />

declare const XO_LITE_VERSION: string
declare const XO_LITE_GIT_HEAD: string
4 changes: 1 addition & 3 deletions @xen-orchestra/lite/src/components/RemoteConsole.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,9 +61,7 @@ const clearVncClient = () => {
vncClient.removeEventListener('disconnect', handleDisconnectionEvent)
vncClient.removeEventListener('connect', handleConnectionEvent)
if (vncClient._rfbConnectionState !== 'disconnected') {
vncClient.disconnect()
}
vncClient.disconnect()
vncClient = undefined
}
Expand Down
1 change: 1 addition & 0 deletions @xen-orchestra/web-core/env.d.ts
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
/// <reference types="novnc__novnc" />
/// <reference types="vite/client" />
342 changes: 0 additions & 342 deletions @xen-orchestra/web-core/lib/types/novnc.d.ts

This file was deleted.

2 changes: 1 addition & 1 deletion @xen-orchestra/web-core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
},
"devDependencies": {
"@types/lodash-es": "^4.17.12",
"@types/novnc__novnc": "^1.3.5",
"@types/novnc__novnc": "^1.5.0",
"@vue/tsconfig": "^0.5.1",
"pinia": "^2.1.7",
"vue": "^3.4.13",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4305,10 +4305,10 @@
resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz#56e2cc26c397c038fab0e3a917a12d5c5909e901"
integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==

"@types/novnc__novnc@^1.3.5":
version "1.3.5"
resolved "https://registry.yarnpkg.com/@types/novnc__novnc/-/novnc__novnc-1.3.5.tgz#af41a2fd01fc50e40306d1e62d44a0035e7fad25"
integrity sha512-iMYzwgNDVmSlkqTKh6tkz25Tir2i2h1Jlhja0e6ycL3GPP+HCuhPA3uzZrVLrgKUEj1RaDhI3KGMPI47bV0jQw==
"@types/novnc__novnc@^1.5.0":
version "1.5.0"
resolved "https://registry.yarnpkg.com/@types/novnc__novnc/-/novnc__novnc-1.5.0.tgz#5f58687f0fa6591b75e91eb75237520da440dbb4"
integrity sha512-9DrDJK1hUT6Cbp4t03IsU/DsR6ndnIrDgZVrzITvspldHQ7n81F3wUDfq89zmPM3wg4GErH11IQa0QuTgLMf+w==

"@types/ps-tree@^1.1.2":
version "1.1.6"
Expand Down

0 comments on commit 700149d

Please sign in to comment.