Skip to content

Commit

Permalink
Use auto inferred type on electronAPI.Terminal
Browse files Browse the repository at this point in the history
  • Loading branch information
huchenlei committed Nov 27, 2024
1 parent c4d3c67 commit 5e50e53
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 17 deletions.
8 changes: 4 additions & 4 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
},
"dependencies": {
"@atlaskit/pragmatic-drag-and-drop": "^1.3.1",
"@comfyorg/comfyui-electron-types": "^0.3.6",
"@comfyorg/comfyui-electron-types": "^0.3.19",
"@comfyorg/litegraph": "^0.8.37",
"@primevue/themes": "^4.0.5",
"@vueuse/core": "^11.0.0",
Expand Down
13 changes: 1 addition & 12 deletions src/components/bottomPanel/tabs/terminal/CommandTerminal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,7 @@ const terminalCreated = (
{ terminal, useAutoSize }: ReturnType<typeof useTerminal>,
root: Ref<HTMLElement>
) => {
// TODO: use types from electron package
const terminalApi = electronAPI()['Terminal'] as {
onOutput(cb: (message: string) => void): () => void
resize(cols: number, rows: number): void
restore(): Promise<{
buffer: string[]
pos: { x: number; y: number }
size: { cols: number; rows: number }
}>
storePos(x: number, y: number): void
write(data: string): void
}
const terminalApi = electronAPI().Terminal
let offData: IDisposable
let offOutput: () => void
Expand Down

0 comments on commit 5e50e53

Please sign in to comment.