Added js-doc for formatFunction

Signed-off-by: RMidhunSuresh <rmidhunsuresh@gmail.com>
This commit is contained in:
RMidhunSuresh 2021-05-17 20:56:12 +05:30
parent 11d551f8a3
commit 1d63799c9b

View file

@ -28,6 +28,9 @@ export class TextMessageView extends TemplateView {
}
}
/**
* Map from part to function that outputs DOM for the part
*/
const formatFunction = {
text: textPart => text(textPart.text),
link: linkPart => tag.a({ href: linkPart.url, target: "_blank", rel: "noopener" }, [linkPart.text]),