Refine type for activeHandler in DirectiveStreamingParser

This commit is contained in:
Steven T. Cramer 2025-06-16 23:19:12 +07:00
parent d18e110668
commit 7471bd51cf

View file

@ -4,6 +4,7 @@ import { ParseContext, CodeBlockState } from "./ParseContext"
import { DirectiveRegistryFactory } from "./DirectiveRegistryFactory"
import { FallbackParser } from "./FallbackParser"
import { XmlUtils } from "./XmlUtils"
import { DirectiveHandler } from "./DirectiveHandler"
export class DirectiveStreamingParser {
private static registry = DirectiveRegistryFactory.create()
@ -23,7 +24,7 @@ export class DirectiveStreamingParser {
const parser = sax.parser(false, { lowercase: true })
let parseError = false
let tagStack: string[] = []
let activeHandler: any = null
let activeHandler: DirectiveHandler | null = null
parser.onopentag = (node: sax.Tag) => {
// Check if we're inside a code block (either global or within tool parameters)