diff --git a/src/index.tsx b/src/index.tsx index ded9fb0..1cc1f13 100644 --- a/src/index.tsx +++ b/src/index.tsx @@ -13,9 +13,9 @@ import { isServer, spread, escape, useAssets, ssr } from "solid-js/web"; export const MetaContext = createContext(); -interface TagDescription { - tag: string; - props: Record; +interface TagDescription { + tag: T; + props: props: JSX.HTMLElementTags[T];; setting?: { close?: boolean; escape?: boolean }; id: string; name?: string; @@ -221,7 +221,7 @@ const MetaTag = ( return null; }; -export function useHead(tagDesc: TagDescription) { +export function useHead(tagDesc: TagDescription) { const c = useContext(MetaContext); if (!c) throw new Error(" should be in the tree");