Add TypeScript definitions for better guardrails

Problem: We have TypeScript enabled on the project but have been missing
lots of definition files, so there are like 500 errors when you enable
`--noImplicitAny`.

Solution: Add definitions and fix the bugs that they point out. This
reduces the number of errors with `--noImplicitAny` to 285.
This commit is contained in:
Christian Bundy
2020-03-24 09:21:59 -07:00
parent 1adbd15afd
commit c9fffe2b9c
8 changed files with 290 additions and 19 deletions

View File

@ -53,5 +53,6 @@ const toUrl = (mentions) => {
module.exports = (input, mentions = []) =>
md.block(input, {
toUrl: toUrl(mentions),
/** @param character {string} */
emoji: (character) => span({ class: "emoji" }, character).outerHTML,
});