refactor: ♻️ Simplify Note code with a provide/inject pattern
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

This commit is contained in:
Jesse Wierzbinski 2026-01-09 23:10:45 +01:00
parent b23ed66401
commit f5918cc7f9
No known key found for this signature in database
12 changed files with 140 additions and 199 deletions

View file

@ -0,0 +1,11 @@
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>;
}>;