How to use the @electron/docs-parser.DocumentationTag.AVAILABILITY_READONLY function in @electron/docs-parser

To help you get started, we’ve selected a few @electron/docs-parser examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github electron / typescript-definitions / src / module-declaration.ts View on Github external
.forEach(prop => {
        const isOptional = !prop.required ? '?' : '';
        const isReadonly = prop.additionalTags.includes(DocumentationTag.AVAILABILITY_READONLY)
          ? 'readonly '
          : '';
        moduleAPI.push(`${isReadonly}${prop.name}${isOptional}: ${utils.typify(prop)};`);
      });
  }