mirror of
https://github.com/wavetermdev/waveterm.git
synced 2025-01-21 21:32:13 +01:00
fix typescript errors, use wails models
This commit is contained in:
parent
c203b6b376
commit
0eeacecc06
@ -5,7 +5,7 @@ import * as React from "react";
|
||||
import * as jotai from "jotai";
|
||||
import { atoms, blockDataMap, useBlockAtom } from "@/store/global";
|
||||
import { Markdown } from "@/element/markdown";
|
||||
import { FileService } from "@/bindings/fileservice";
|
||||
import { FileService, FileInfo, FullFile } from "@/bindings/fileservice";
|
||||
import * as util from "@/util/util";
|
||||
import { CenteredDiv } from "../element/quickelems";
|
||||
|
||||
|
@ -49,7 +49,7 @@ function Widgets() {
|
||||
|
||||
async function createBlock(blockDef: BlockDef) {
|
||||
const rtOpts = { termsize: { rows: 25, cols: 80 } };
|
||||
const rtnBlock: BlockData = await BlockService.CreateBlock(blockDef, rtOpts);
|
||||
const rtnBlock: BlockData = (await BlockService.CreateBlock(blockDef, rtOpts)) as BlockData;
|
||||
const newBlockAtom = jotai.atom(rtnBlock);
|
||||
blockDataMap.set(rtnBlock.blockid, newBlockAtom);
|
||||
addBlockIdToTab(activeTabId, rtnBlock.blockid);
|
||||
|
15
frontend/types/custom.d.ts
vendored
15
frontend/types/custom.d.ts
vendored
@ -33,21 +33,6 @@ declare global {
|
||||
files?: FileDef[];
|
||||
meta?: MetaDataType;
|
||||
};
|
||||
|
||||
type FileInfo = {
|
||||
path: string;
|
||||
notfound: boolean;
|
||||
size: number;
|
||||
mode: number;
|
||||
modtime: number;
|
||||
isdir: boolean;
|
||||
mimetype: string;
|
||||
};
|
||||
|
||||
type FullFile = {
|
||||
info: FileInfo;
|
||||
data64: string;
|
||||
};
|
||||
}
|
||||
|
||||
export {};
|
||||
|
Loading…
Reference in New Issue
Block a user