diff --git a/src/hooks/useNostrPublish.ts b/src/hooks/useNostrPublish.ts index b9a3bc2..f5d9c02 100644 --- a/src/hooks/useNostrPublish.ts +++ b/src/hooks/useNostrPublish.ts @@ -5,12 +5,19 @@ import { useCurrentUser } from "./useCurrentUser"; import type { NostrEvent } from "@nostrify/nostrify"; -export function useNostrPublish(): UseMutationResult { +type EventTemplate = Pick & + Partial>; + +export function useNostrPublish(): UseMutationResult< + NostrEvent, + Error, + EventTemplate +> { const { nostr } = useNostr(); const { user } = useCurrentUser(); return useMutation({ - mutationFn: async (t: Omit) => { + mutationFn: async (t: EventTemplate) => { if (user) { const tags = t.tags ?? []; diff --git a/tsconfig.json b/tsconfig.json index a7596da..70b8913 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -15,14 +15,8 @@ "jsx": "react-jsx", /* Linting */ - "strict": false, - "strictNullChecks": true, - "noUnusedLocals": false, - "noUnusedParameters": false, - "noImplicitAny": false, - "noFallthroughCasesInSwitch": false, + "strict": true, - "baseUrl": ".", "paths": { "@/*": ["./src/*"] }