File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- import type { ReplHistoryEntry } from "../hooks/replLogic " ;
1+ import type { ReplHistoryEntry } from "../types " ;
22import { cn } from "../utils/css" ;
33
44interface ReplHistoryProps extends React . HTMLAttributes < HTMLDivElement > {
Original file line number Diff line number Diff line change 11import { setReplVar } from "repl:api/host-state" ;
22import { useMemo , useReducer , useState } from "react" ;
3- import type { ReplStatus } from "../types" ;
3+ import type { ReplHistoryEntry , ReplStatus } from "../types" ;
44import type { WasmEngine } from "./wasm" ;
55
66const MAX_HISTORY_LENGTH = 50 ;
77
8- export type ReplHistoryEntry =
9- | {
10- stdout ?: string ;
11- stderr ?: string ;
12- status : ReplStatus ;
13- }
14- | {
15- stdin : string ;
16- } ;
17-
188function setExitStatusAnd$0 ( status : ReplStatus , stdout ?: string ) {
199 if ( status === "success" ) {
2010 setReplVar ( { key : "?" , value : "0" } ) ;
Original file line number Diff line number Diff line change 1+ // wasm
2+
13import type * as HostApiNamespace from "./generated/host-api" ;
4+ import type { ReplStatus } from "./generated/interfaces/repl-api-transport" ;
25import type * as PluginApiNamespace from "./generated/plugin-api" ;
36
47export * from "./generated/interfaces/repl-api-transport" ;
58
69export type HostApi = typeof HostApiNamespace ;
710export type PluginApi = typeof PluginApiNamespace ;
11+
12+ // ui
13+
14+ export type ReplHistoryEntry =
15+ | {
16+ stdout ?: string ;
17+ stderr ?: string ;
18+ status : ReplStatus ;
19+ }
20+ | {
21+ stdin : string ;
22+ } ;
You can’t perform that action at this time.
0 commit comments