mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-05-12 19:59:02 +08:00
* add mjml (mjml.io) types * update mjml definition, actually verify linter runs, be more explicit in re: error types * mjml: int -> number. why does lint pass w/ 'int'? ah well. * per @plantain-00 CR
11 lines
381 B
TypeScript
11 lines
381 B
TypeScript
import mjml2html = require('mjml');
|
|
|
|
const simple_test = mjml2html("<mjml>");
|
|
const html = simple_test.html;
|
|
const errors = simple_test.errors;
|
|
let formattedMessage = errors[0].formattedMessage;
|
|
formattedMessage = "force string test";
|
|
|
|
const minimal_opts_test = mjml2html("<mjml>", {beautify: true});
|
|
const validation_level_test = mjml2html("<mjml>", {validationLevel: "strict"});
|