types (EN) - bhsd-harry/wikiparser-node GitHub Wiki
Expand
AST in JSON format.
property: range
start and end indices
type: [number, number]
property: type
token type, unavailable for text nodes
type: string | undefined
property: name
token name if available
type: string | undefined
property: childNodes
array of child nodes, unavailable for text nodes
type: AST[] | undefined
property: data
data of text nodes
type: string | undefined
✅ Expand
Parse configuration.
property: ext
extension tags
type: string[]
property: html
HTML tags
type: [string[], string[], string[]]
property: namespaces
namespaces
type: Record<string, string>
property: nsid
namespace IDs
type: Record<string, number>
property: variable
variables
type: string[]
property: functionHook
parser functions
type: string[]
property: parserFunction
variables or parser functions
type: [Record<string, string>, Record<string, string>, string[], string[]]
property: doubleUnderscore
behavior switches
type: [string[], string[], Record<string, string>?, Record<string, string>?]
property: protocol
external link protocol
type: string
property: interwiki
interwiki prefixes
type: string[]
property: img
image parameters
type: Record<string, string>
property: redirection
magic words for redirection
type: string[]
property: variants
language variants
type: string[]
property: articlePath
$wgArticlePath
, optional
type: string
property: conversionTable
unidirectional conversion table, optional
type: [string, string][]
property: redirects
redirects, optional
type: [string, string][]
✅ Expand
Grammar error.
property: rule
rule name
type: LintError.Rule
property: message
error type
type: string
property: severity
error severity
type: 'error' | 'warning'
property: startIndex
start position
type: number
property: endIndex
end position
type: number
property: startLine
start line
type: number
property: endLine
end line
type: number
property: startCol
start column
type: number
property: endCol
end column
type: number
property: fix
auto-fix, optional
type: LintError.Fix
property: suggestions
suggestions, optional
type: LintError.Fix[]
✅ Expand
Fix suggestion for grammar error.
property: range
start and end positions
type: [number, number]
property: text
replacement text
type: string
property: desc
description
type: string