From 21d5512b9835239ebbcb09c0861d0be7b92e572b Mon Sep 17 00:00:00 2001 From: Siddharth VP Date: Thu, 24 Oct 2024 02:39:07 +0530 Subject: [PATCH] wikitext: make parseTemplates() config optional --- src/wikitext.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/wikitext.ts b/src/wikitext.ts index 66cc0b8..1f5dcd7 100644 --- a/src/wikitext.ts +++ b/src/wikitext.ts @@ -229,7 +229,7 @@ export class Parameter { // written by me. (cc-by-sa/GFDL) /** See {@link MwnWikitext.parseTemplates} */ -export function parseTemplates(wikitext: string, config: TemplateConfig): Template[] { +export function parseTemplates(wikitext: string, config?: TemplateConfig): Template[] { config = config || { recursive: false, namePredicate: null, @@ -602,7 +602,7 @@ export default function (bot: Mwn) { } /** @inheritDoc */ - parseTemplates(config: TemplateConfig): Template[] { + parseTemplates(config?: TemplateConfig): Template[] { return (this.templates = parseTemplates(this.text, config)); }