Skip to content

Commit

Permalink
type alias for Compute Error Rep
Browse files Browse the repository at this point in the history
  • Loading branch information
smorrisj committed Oct 17, 2023
1 parent d1c89b7 commit 7789c8d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
9 changes: 7 additions & 2 deletions client/src/commands/run.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ import {
import { isOutputHtmlEnabled } from "../components/Helper/SettingHelper";
import { LogFn as LogChannelFn } from "../components/LogChannel";
import { showResult } from "../components/ResultPanel";
import { OnLogFn, RunResult, getSession } from "../connection";
import {
ErrorRepresentation,
OnLogFn,
RunResult,
getSession,
} from "../connection";
import { profileConfig, switchProfile } from "./profile";

interface FoldingBlock {
Expand Down Expand Up @@ -233,7 +238,7 @@ export async function runTask(
return cancelled ? undefined : session.run(code);
}

const isErrorRep = (err: unknown): err is SessionError => {
const isErrorRep = (err: unknown): err is ErrorRepresentation => {
if (
err &&
typeof err === "object" &&
Expand Down
2 changes: 2 additions & 0 deletions client/src/connection/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@ import {
import { getSession as getCOMSession } from "./com";
import { Config as RestConfig, getSession as getRestSession } from "./rest";
import {
Error2 as ComputeError,
LogLine as ComputeLogLine,
LogLineTypeEnum as ComputeLogLineTypeEnum,
} from "./rest/api/compute";
Expand All @@ -20,6 +21,7 @@ import { getSession as getSSHSession } from "./ssh";

let profileConfig: ProfileConfig;

export type ErrorRepresentation = ComputeError;
export type LogLine = ComputeLogLine;
export type LogLineTypeEnum = ComputeLogLineTypeEnum;
export type OnLogFn = (logs: LogLine[]) => void;
Expand Down

0 comments on commit 7789c8d

Please sign in to comment.