@zhead/schema
Typescript definitions for document <head>
.
Installation
npm install --save-dev @zhead/schema
yarn add --dev @zhead/schema
Types
See head.ts for the full list of types.
export interface Head<E extends MergeHead = MergeHead> {
title?: string
titleTemplate?: string | ((title?: string) => string)
base?: Partial<Merge<E['base'], Base>>
link?: (Link & UnsafeKeys & Default<E['link']>)[]
meta?: (Meta & UnsafeKeys & Default<E['meta']>)[]
style?: (Style & UnsafeKeys & Default<E['style']>)[]
script?: (Script & UnsafeKeys & Default<E['script']>)[]
noscript?: (Noscript & UnsafeKeys & Default<E['noscript']>)[]
htmlAttrs?: (HtmlAttributes & UnsafeKeys & Default<E['htmlAttrs']>)
bodyAttrs?: (BodyAttributes & UnsafeKeys & Default<E['bodyAttrs']>)
}