Type alias AnnotationProcessor<PType>

AnnotationProcessor<PType>: ((content, original, config?) => Promise<PType> | PType)

Type definition for an annotation processor function.

Type Parameters

  • PType = any

    The type of the processed content.

Type declaration

    • (content, original, config?): Promise<PType> | PType
    • Parameters

      • content: string

        The content to be processed.

      • original: string

        The original content before any processing.

      • Optional config: object

        Optional configuration object.

      Returns Promise<PType> | PType

Returns

  • The processed content, can be a Promise or a direct value.