Enable TypeScript strict mode

This commit is contained in:
Alex Gleason committed 2026-01-21 14:46:11 -06:00
1 parent d5e267103c
commit 6ba5cf9bb2
12 files changed
+229 -13

No files matched your search

+4 -2
View File
@@ -5,12 +5,14 @@ import { useCurrentUser } from "./useCurrentUser";
import type { NostrEvent } from "@nostrify/nostrify";
export function useNostrPublish(): UseMutationResult<NostrEvent> {
type NostrEventInput = Pick<NostrEvent, 'kind' | 'content'> & Partial<Pick<NostrEvent, 'tags' | 'created_at'>>;
export function useNostrPublish(): UseMutationResult<NostrEvent, Error, NostrEventInput> {
const { nostr } = useNostr();
const { user } = useCurrentUser();
return useMutation({
mutationFn: async (t: Omit<NostrEvent, 'id' | 'pubkey' | 'sig'>) => {
mutationFn: async (t: NostrEventInput) => {
if (user) {
const tags = t.tags ?? [];