Added more precise JSDoc to email content generator

refs https://github.com/TryGhost/Toolbox/issues/292

- Provided better type checking/suggestions
This commit is contained in:
Naz 2022-05-05 12:17:03 +08:00
parent 30f8b0a446
commit 32e42ae276

View File

@ -24,7 +24,7 @@ class EmailContentGenerator {
* @param {Object} options * @param {Object} options
* @param {string} options.template - HTML template name to use for generation * @param {string} options.template - HTML template name to use for generation
* @param {Object} [options.data] - variable data to use during HTML template compilation * @param {Object} [options.data] - variable data to use during HTML template compilation
* @returns {Promise} resolves with an object containing html and text properties * @returns {Promise<{html: String, text: String}>} resolves with an object containing html and text properties
*/ */
async getContent(options) { async getContent(options) {
const defaults = { const defaults = {