mirror of
https://github.com/jackyzha0/quartz.git
synced 2025-12-27 23:04:05 -06:00
Added QuartzParserPlugin typing
This commit is contained in:
parent
169a570ed5
commit
c3f1695595
@ -10,6 +10,7 @@ export interface PluginTypes {
|
||||
transformers: QuartzTransformerPluginInstance[]
|
||||
filters: QuartzFilterPluginInstance[]
|
||||
emitters: QuartzEmitterPluginInstance[]
|
||||
parsers: QuartzParserPluginInstance[]
|
||||
}
|
||||
|
||||
type OptionType = object | undefined
|
||||
@ -45,3 +46,14 @@ export type QuartzEmitterPluginInstance = {
|
||||
resources: StaticResources,
|
||||
): Promise<DepGraph<FilePath>>
|
||||
}
|
||||
|
||||
export type QuartzParserPlugin<Options extends OptionType = undefined> = (
|
||||
opts?: Options,
|
||||
) => QuartzParserPluginInstance
|
||||
export type QuartzParserPluginInstance = {
|
||||
name: string
|
||||
textTransform: (ctx: BuildCtx, src: string | Buffer) => string | Buffer
|
||||
markdownPlugins: (ctx: BuildCtx) => PluggableList
|
||||
htmlPlugins: (ctx: BuildCtx) => PluggableList
|
||||
externalResources: (ctx: BuildCtx) => Partial<StaticResources>
|
||||
}
|
||||
|
||||
Loading…
Reference in New Issue
Block a user