spiegel-keyman/common/tools/api-extractor
Marc Durdin d86604902e chore(developer): consolidate api-extractor usage in Developer
* Centralize the api-extractor.json files, update usage
* Support @since
* Tidy up a few warnings relating to API documentation content

Fixes: #14838
Test-bot: skip
2026-06-24 14:45:05 +02:00
..
api-extractor.base.json chore(developer): consolidate api-extractor usage in Developer 2026-06-24 14:45:05 +02:00
api-extractor.template.json chore(developer): consolidate api-extractor usage in Developer 2026-06-24 14:45:05 +02:00
README.md chore(developer): consolidate api-extractor usage in Developer 2026-06-24 14:45:05 +02:00
tsdoc.template.json chore(developer): consolidate api-extractor usage in Developer 2026-06-24 14:45:05 +02:00

api-extractor.template.json

api-extractor.template.json contains a template for api-extractor; these parameters cannot be passed in to the tool, so we modify this template as needed with the following parameters:

  • $keyman_root: the $KEYMAN_ROOT variable, with backslash \ translated to forward slash /
  • $index_d_ts: the filename index.d.ts or the corresponding filename for the entry point of the project
  • $project_path: the path for the module, relative to the base of the repo
  • $report_temp: a temporary path for output files for api-extractor
  • $report_folder: target folder for completed api-extractor API documentation

tsdoc.template.json

tsdoc.template.json is copied (unmodified) from this folder into tsdoc.json in project folders (alongside tsconfig.json) before running api-extractor and removed again afterwards; there is no way to specify an alternate location for the file.

tsdoc.template.json includes a definition for "@since" which has been proposed in https://github.com/microsoft/tsdoc/issues/136.

Notes

These files are used by typescript_run_api_extractor() in typescript.inc.sh.

This is setup only for Developer projects at this time as outputs go into developer/docs and developer/build; future generalization requires changing only $report_temp and $report_folder parameters in typescript_run_api_extractor().