{"_id":"@microsoft/tsdoc-config@0.18.3","tag":"latest","bugs":{"url":"https://github.com/microsoft/tsdoc/issues"},"dist":{"shasum":"9afdae403bd339a7a20c88b8569826db1aca8b1a","tarball":"http://registry-npm.ywwl.com/@microsoft/tsdoc-config/download/@microsoft/tsdoc-config-0.18.3.tgz","fileCount":13,"integrity":"sha512-0I0rGXo1eJziw3EEErkDS9p/0RzBcyOiV+zbSDqOZTeURmhtut+WIvpih0LM5g+ZpZ9SyFxDfkhAcl/r8e2zGw==","signatures":[{"sig":"MEQCIBN9Ei4gETvoegQGWqsMXbuFJWa7PB24YLKDnAY7YJ0sAiBHfL3XiBfBapDU7h1ZGgwnYOu6MXC5ToeR7YJxn2QIVg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"},{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQCGWoiUv0D1eL1/2DrTPZb1ioa+hdLdAXLQjdkts9uI6gIgQ2F62N8nHjArAzG/ECuR8nnWfJsUbx/WMhqStxUeu2g="}],"unpackedSize":106539,"size":23884,"noattachment":false,"key":"/@microsoft/tsdoc-config/-/@microsoft/tsdoc-config-0.18.3.tgz"},"main":"lib/index.js","name":"@microsoft/tsdoc-config","_from":"file:M:\\SvcFab\\_App\\MS.Ess.PackageManager.Publisher_App1\\temp\\58f01996-05d0-49b4-9010-8f88797af1d5\\microsoft-tsdoc-config-0.18.3.tgz","license":"MIT","scripts":{"build":"heft test --clean","watch":"heft test --clean --watch","_phase:test":"heft run --only test -- --clean","_phase:build":"heft run --only build -- --clean"},"typings":"lib/index.d.ts","version":"0.18.3","_npmUser":{"name":"microsoft1es","email":"npmjs@microsoft.com"},"homepage":"https://tsdoc.org/","keywords":["TypeScript","documentation","doc","comments","JSDoc","parser","standard"],"_resolved":"M:\\SvcFab\\_App\\MS.Ess.PackageManager.Publisher_App1\\temp\\58f01996-05d0-49b4-9010-8f88797af1d5\\microsoft-tsdoc-config-0.18.3.tgz","_integrity":"sha512-0I0rGXo1eJziw3EEErkDS9p/0RzBcyOiV+zbSDqOZTeURmhtut+WIvpih0LM5g+ZpZ9SyFxDfkhAcl/r8e2zGw==","repository":{"url":"git+https://github.com/microsoft/tsdoc.git","type":"git","directory":"tsdoc-config"},"description":"A loader for the tsdoc.json file","directories":{},"maintainers":[{"name":"microsoft1es","email":"npmjs@microsoft.com"},{"name":"microsoft-oss-releases","email":"microsoft-oss-publishing@microsoft.com"},{"name":"odspnpm","email":"odspnpm@microsoft.com"}],"_nodeVersion":"18.5.0","dependencies":{"ajv":"~8.18.0","jju":"~1.4.0","resolve":"~1.22.2","@microsoft/tsdoc":"0.17.1"},"_hasShrinkwrap":false,"devDependencies":{"eslint":"~9.25.1","@types/jju":"1.4.2","@types/resolve":"1.20.2","@rushstack/heft":"1.2.7","tsdoc-build-rig":"1.0.0"},"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/tsdoc-config_0.18.3_1790711478504_0.7193016450762715"},"readme":"# @microsoft/tsdoc-config\r\n\r\n**TSDoc** is a proposal to standardize the doc comments used in [TypeScript](http://www.typescriptlang.org/)\r\nsource files.  The main package [`@microsoft/tsdoc`](https://www.npmjs.com/package/@microsoft/tsdoc) implements\r\nthe TSDoc parser.  The `@microsoft/tsdoc-config` package is an optional add-on for loading the **tsdoc.json**\r\nfile format that enables users to define custom TSDoc tags.  (This functionality was moved to its own package\r\nbecause it requires external dependencies such as NodeJS and `ajv`, whereas the main package is fully self-contained.)\r\n\r\nFor more information about TSDoc, please visit the project website:\r\n\r\nhttps://tsdoc.org\r\n\r\n\r\n## Creating config files\r\n\r\nThe **tsdoc.json** file is optional.  When used, it is expected to be found in the same folder as\r\nthe **tsconfig.json** file for a project.  The loader looks for it by walking upwards in the directory tree\r\nuntil it finds a folder containing **tsconfig.json** or **package.json**, and then it attempts to load\r\n**tsdoc.json** from that location.\r\n\r\nThe **tsdoc.json** file conforms to the [tsdoc.schema.json](\r\nhttps://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json) JSON schema.  It defines tags using\r\nsimilar fields as the\r\n[TSDocTagDefinition](https://github.com/microsoft/tsdoc/blob/main/tsdoc/src/configuration/TSDocTagDefinition.ts)\r\nAPI used by `TSDocParser` from `@microsoft/tsdoc`.\r\n\r\nHere's a simple example:\r\n\r\n**tsdoc.json**\r\n```js\r\n{\r\n  \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n  \"tagDefinitions\": [\r\n    {\r\n      \"tagName\": \"@myTag\",\r\n      \"syntaxKind\": \"modifier\"\r\n    }\r\n  ]\r\n}\r\n```\r\n\r\nIf you want to define custom tags in one place and share them across multiple projects, the `extends` field specifies\r\na list of paths that will be mixed in with the current file:\r\n\r\n**tsdoc.json**\r\n```js\r\n{\r\n  \"$schema\": \"https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json\",\r\n  \"extends\": [\r\n    \"my-package/dist/tsdoc-base.json\",\r\n    \"./path/to/local/file/tsdoc-local.json\"\r\n  ]\r\n}\r\n```\r\n\r\n> NOTE: The `extends` paths are resolved using NodeJS module resolution, so local paths must begin with `./` to avoid\r\n> being interpreted as an NPM package name.\r\n\r\n\r\n## API Usage\r\n\r\nThe code sample below illustrates how to invoke the `@microsoft/tsdoc-config` API to load a\r\n**tsdoc.json** file:\r\n\r\n```ts\r\nimport * as path from 'path';\r\nimport { TSDocParser, TSDocConfiguration } from '@microsoft/tsdoc';\r\nimport { TSDocConfigFile } from '@microsoft/tsdoc-config';\r\n\r\n// Sample source file to be parsed\r\nconst mySourceFile: string = 'my-project/src/example.ts';\r\n\r\n// Load the nearest config file, for example `my-project/tsdoc.json`\r\nconst tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.dirname(mySourceFile));\r\nif (tsdocConfigFile.hasErrors) {\r\n  // Report any errors\r\n  console.log(tsdocConfigFile.getErrorSummary());\r\n}\r\n\r\n// Use the TSDocConfigFile to configure the parser\r\nconst tsdocConfiguration: TSDocConfiguration = new TSDocConfiguration();\r\ntsdocConfigFile.configureParser(tsdocConfiguration);\r\nconst tsdocParser: TSDocParser = new TSDocParser(tsdocConfiguration);\r\n```\r\n\r\n","publish_time":1790711478581,"_cnpm_publish_time":1790711478581,"dist-tags":{"latest":"0.18.3"}}