summaryrefslogtreecommitdiffhomepage
path: root/src/features/markdown/types.ts
diff options
context:
space:
mode:
authorAdam Malczewski <[email protected]>2026-10-24 18:48:54 +0900
committerAdam Malczewski <[email protected]>2026-10-24 18:48:54 +0900
commit34526ff48985643bed532b102e8943fa69e77a79 (patch)
tree4208ec0f5f1ef2cf1a9cd9710a442ce10a5f0c61 /src/features/markdown/types.ts
parentdaefad66bdf8dee132d701a3b43ce0d227dde241 (diff)
parentb666d77df8cf4da6ae40fb5637268926f02cc44d (diff)
downloaddispatch-web-34526ff48985643bed532b102e8943fa69e77a79.tar.gz
dispatch-web-34526ff48985643bed532b102e8943fa69e77a79.zip
Merge branch 'feature/text-file-embeds' into dev
Diffstat (limited to 'src/features/markdown/types.ts')
-rw-r--r--src/features/markdown/types.ts13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/features/markdown/types.ts b/src/features/markdown/types.ts
new file mode 100644
index 0000000..cb3fe8d
--- /dev/null
+++ b/src/features/markdown/types.ts
@@ -0,0 +1,13 @@
+import type { TextFileContextResponse, TextFileResponse } from "@dispatch/transport-contract";
+
+export type TextFileState =
+ | { readonly kind: "loading" }
+ | { readonly kind: "error"; readonly message: string }
+ | { readonly kind: "ready"; readonly file: TextFileResponse };
+export interface TextFileClient {
+ subscribe(path: string, listener: (state: TextFileState) => void): () => void;
+ /** Refresh context as well as the live on-disk file. */
+ refresh(path: string): void;
+ dispose(): void;
+}
+export type TextFileContext = TextFileContextResponse;