32 lines
564 B
TypeScript
32 lines
564 B
TypeScript
import { FunctionName } from "src/lang/expr";
|
|
import { DigithId } from "./scrowlStore";
|
|
|
|
export type Digith =
|
|
| Digith.Repl
|
|
| Digith.NewFunctionDraft
|
|
| Digith.Function
|
|
|
|
export namespace Digith {
|
|
export type Repl = {
|
|
id: DigithId,
|
|
tag: "repl",
|
|
}
|
|
|
|
export type NewFunctionDraft = {
|
|
id: DigithId,
|
|
tag: "new-fn-draft",
|
|
raw_name: string,
|
|
raw_parameters: string,
|
|
raw_body: string,
|
|
}
|
|
|
|
export type Function = {
|
|
id: DigithId,
|
|
tag: "fn",
|
|
name: FunctionName,
|
|
raw_parameters: string,
|
|
raw_body: string,
|
|
}
|
|
|
|
}
|
|
|