Skip to content

Commit

Permalink
Exported Types for wtf namespace (Document, Section, Infobox and othe…
Browse files Browse the repository at this point in the history
…r, see ./types/index.d.ts)
  • Loading branch information
schizokid88 committed Oct 1, 2023
1 parent 478fb72 commit 9abfb69
Show file tree
Hide file tree
Showing 6 changed files with 19 additions and 8 deletions.
2 changes: 1 addition & 1 deletion builds/wtf_wikipedia.cjs
Original file line number Diff line number Diff line change
Expand Up @@ -1995,7 +1995,7 @@
const anyChar = '\\s\\S'; //including newline
const noThanks = new RegExp(`${openTag}[${anyChar}]+?${closeTag}`, 'gi');

const kill_xml = function(wiki) {
const kill_xml = function (wiki) {
//(<ref> tags are parsed in Section class) - luckily, refs can't be recursive.
//types of html/xml that we want to trash completely.
wiki = wiki.replace(noThanks, ' ');
Expand Down
2 changes: 1 addition & 1 deletion builds/wtf_wikipedia.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -1991,7 +1991,7 @@ const closeTag = `< ?/ ?(${ignore$1.join('|')}) ?>`;
const anyChar = '\\s\\S'; //including newline
const noThanks = new RegExp(`${openTag}[${anyChar}]+?${closeTag}`, 'gi');

const kill_xml = function(wiki) {
const kill_xml = function (wiki) {
//(<ref> tags are parsed in Section class) - luckily, refs can't be recursive.
//types of html/xml that we want to trash completely.
wiki = wiki.replace(noThanks, ' ');
Expand Down
4 changes: 2 additions & 2 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/classify/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions plugins/markdown/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

11 changes: 11 additions & 0 deletions types/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,17 @@ declare namespace wtf {
export { extend }
export { extend as plugin }
export { version }
export { Document }
export { Section }
export { Infobox }
export { Template }
export { Table }
export { Reference }
export { Paragraph }
export { Image }
export { Link }
export { List }
export { Sentence }
}

declare function extend(fn: Function): {
Expand Down

0 comments on commit 9abfb69

Please sign in to comment.