File tree Expand file tree Collapse file tree 2 files changed +6
-3
lines changed
Expand file tree Collapse file tree 2 files changed +6
-3
lines changed Original file line number Diff line number Diff line change @@ -5,6 +5,7 @@ import { createUnplugin } from 'unplugin'
55import { getHeadLinkTags } from './loaders'
66import { customVirtualModule } from './loaders/custom'
77import { fontsourceImports , fontsourceVirtualModule } from './loaders/fontsource'
8+ import { HtmlTagDescriptor } from 'vite'
89
910const virtualStylesId = 'unfonts.css'
1011const resolvedVirtualStylesId = `\0${ virtualStylesId } `
@@ -109,7 +110,7 @@ export default createUnplugin<Options | undefined>((userOptions) => {
109110 }
110111 let tagsReturned = tags
111112 if ( options ?. custom ?. linkFilter ) {
112- const newTags : object [ ] | boolean = options ?. custom ?. linkFilter ( tags )
113+ const newTags = options ?. custom ?. linkFilter ( tags )
113114 if ( Array . isArray ( newTags ) ) {
114115 tagsReturned = newTags
115116 } else {
@@ -160,7 +161,7 @@ function generateVitepressBundle(
160161
161162 let tagsReturned = tags
162163 if ( options ?. custom ?. linkFilter ) {
163- const newTags : object [ ] | boolean = options ?. custom ?. linkFilter ( tags )
164+ const newTags = options ?. custom ?. linkFilter ( tags )
164165 if ( Array . isArray ( newTags ) ) {
165166 tagsReturned = newTags
166167 } else {
Original file line number Diff line number Diff line change 1+ import { HtmlTagDescriptor } from "vite"
2+
13export interface Options {
24 custom ?: CustomFonts
35 fontsource ?: FontsourceFonts
@@ -102,7 +104,7 @@ export interface CustomFonts {
102104 * generated.
103105 * @default true
104106 */
105- linkFilter ?: ( tags : object [ ] ) => object [ ] | boolean
107+ linkFilter ?: ( tags : HtmlTagDescriptor [ ] ) => HtmlTagDescriptor [ ] | boolean
106108
107109 /**
108110 * @default : 'head-prepend'
You can’t perform that action at this time.
0 commit comments