Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Template only exported as type #79

Closed
JN-Jones opened this issue Aug 5, 2024 · 1 comment
Closed

Template only exported as type #79

JN-Jones opened this issue Aug 5, 2024 · 1 comment

Comments

@JN-Jones
Copy link

JN-Jones commented Aug 5, 2024

Hi, in certain scenarios I'd like to create an instance of Template directly. One such scenario are tests for wiki-specific functionality that relies on Template. As it is part of the documentation I expected this to work, however it currently is only exported as type so I've to rely on a workaround that requires me to setup a proper bot instance.

const wt = new bot.Wikitext("{{template}}");
wt.parseTemplates({});
const template = wt.templates[0];
@siddharthvp
Copy link
Owner

Fixed in 870ddd1.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants