frontend/app/components/notes/provider.ts
Jesse Wierzbinski f5918cc7f9
Some checks failed
CodeQL / Analyze (javascript) (push) Failing after 1s
Deploy to GitHub Pages / build (push) Failing after 0s
Deploy to GitHub Pages / deploy (push) Has been skipped
Docker / build (push) Failing after 0s
Mirror to Codeberg / Mirror (push) Failing after 0s
refactor: ♻️ Simplify Note code with a provide/inject pattern
2026-01-09 23:10:45 +01:00

12 lines
382 B
TypeScript

import type { Status } from "@versia/client/schemas";
import type { InjectionKey } from "vue";
import type { z } from "zod";
type PartialBy<T, K extends keyof T> = Omit<T, K> & Partial<Pick<T, K>>;
export const key = Symbol() as InjectionKey<{
note: PartialBy<z.infer<typeof Status>, "reblog" | "quote">;
isRemote: boolean;
rebloggerNote?: z.infer<typeof Status>;
}>;