interface-data-contract.ejs 375 B

12345678910
  1. <%
  2. const { contract, utils } = it;
  3. const { formatDescription, require, _ } = utils;
  4. %>
  5. export interface <%~ contract.name %> {
  6. <% _.forEach(contract.$content, (field) => { %>
  7. <%~ includeFile('./object-field-jsdoc.ejs', { ...it, field }) %>
  8. <%~ field.name %><%~ field.isRequired ? '' : '?' %>: <%~ field.value %><%~ field.isNullable ? ' | null' : ''%>;
  9. <% }) %>
  10. }