@@ -9,9 +9,8 @@ import { defu } from 'defu'
9
9
import { createOnigurumaEngine } from 'shiki/engine/oniguruma'
10
10
import { visit } from 'unist-util-visit'
11
11
import type { ResolvedCollection } from '../../types/collection'
12
- import type { FileAfterParseHook , FileBeforeParseHook , ModuleOptions } from '../../types/module '
12
+ import type { FileAfterParseHook , FileBeforeParseHook , ModuleOptions , ContentFile , ContentTransformer } from '../../types'
13
13
import { logger } from '../dev'
14
- import type { ContentFile , ContentTransformer } from '../../types'
15
14
import { transformContent } from './transformers'
16
15
17
16
let parserOptions = {
@@ -147,7 +146,6 @@ export async function createParser(collection: ResolvedCollection, nuxt?: Nuxt)
147
146
file . extension = file . extension ?? file . path . includes ( '.' ) ? '.' + file . path . split ( '.' ) . pop ( ) : undefined
148
147
}
149
148
const beforeParseCtx : FileBeforeParseHook = { file, collection, parserOptions }
150
- // @ts -expect-error runtime type
151
149
await nuxt ?. callHook ?.( 'content:file:beforeParse' , beforeParseCtx )
152
150
const { file : hookedFile } = beforeParseCtx
153
151
@@ -183,7 +181,6 @@ export async function createParser(collection: ResolvedCollection, nuxt?: Nuxt)
183
181
}
184
182
185
183
const afterParseCtx : FileAfterParseHook = { file : hookedFile , content : result , collection }
186
- // @ts -expect-error runtime type
187
184
await nuxt ?. callHook ?.( 'content:file:afterParse' , afterParseCtx )
188
185
return afterParseCtx . content
189
186
}
0 commit comments