Gathering detailed insights and metrics for @microsoft/tsdoc-config
Gathering detailed insights and metrics for @microsoft/tsdoc-config
Gathering detailed insights and metrics for @microsoft/tsdoc-config
Gathering detailed insights and metrics for @microsoft/tsdoc-config
A doc comment standard for TypeScript
npm install @microsoft/tsdoc-config
Typescript
Module System
Node Version
NPM Version
96.4
Supply Chain
94.9
Quality
78.5
Maintenance
100
Vulnerability
99.3
License
TypeScript (97.39%)
JavaScript (1.94%)
CSS (0.28%)
Shell (0.21%)
Handlebars (0.14%)
SCSS (0.03%)
Total Downloads
184,173,727
Last Day
117,296
Last Week
2,483,550
Last Month
11,222,631
Last Year
101,620,153
MIT License
4,850 Stars
1,148 Commits
140 Forks
47 Watchers
30 Branches
10,000 Contributors
Updated on Jul 05, 2025
Minified
Minified + Gzipped
Latest Version
0.17.1
Package Id
@microsoft/tsdoc-config@0.17.1
Unpacked Size
162.73 kB
Size
32.09 kB
File Count
72
NPM Version
10.8.2
Node Version
18.20.5
Published on
Nov 23, 2024
Cumulative downloads
Total Downloads
Last Day
-17.6%
117,296
Compared to previous day
Last Week
-10.8%
2,483,550
Compared to previous week
Last Month
3.2%
11,222,631
Compared to previous month
Last Year
106%
101,620,153
Compared to previous year
TSDoc is a proposal to standardize the doc comments used in TypeScript
source files. The main package @microsoft/tsdoc
implements
the TSDoc parser. The @microsoft/tsdoc-config
package is an optional add-on for loading the tsdoc.json
file format that enables users to define custom TSDoc tags. (This functionality was moved to its own package
because it requires external dependencies such as NodeJS and ajv
, whereas the main package is fully self-contained.)
For more information about TSDoc, please visit the project website:
The tsdoc.json file is optional. When used, it is expected to be found in the same folder as the tsconfig.json file for a project. The loader looks for it by walking upwards in the directory tree until it finds a folder containing tsconfig.json or package.json, and then it attempts to load tsdoc.json from that location.
The tsdoc.json file conforms to the tsdoc.schema.json JSON schema. It defines tags using
similar fields as the
TSDocTagDefinition
API used by TSDocParser
from @microsoft/tsdoc
.
Here's a simple example:
tsdoc.json
1{ 2 "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", 3 "tagDefinitions": [ 4 { 5 "tagName": "@myTag", 6 "syntaxKind": "modifier" 7 } 8 ] 9}
If you want to define custom tags in one place and share them across multiple projects, the extends
field specifies
a list of paths that will be mixed in with the current file:
tsdoc.json
1{ 2 "$schema": "https://developer.microsoft.com/json-schemas/tsdoc/v0/tsdoc.schema.json", 3 "extends": [ 4 "my-package/dist/tsdoc-base.json", 5 "./path/to/local/file/tsdoc-local.json" 6 ] 7}
NOTE: The
extends
paths are resolved using NodeJS module resolution, so local paths must begin with./
to avoid being interpreted as an NPM package name.
The code sample below illustrates how to invoke the @microsoft/tsdoc-config
API to load a
tsdoc.json file:
1import * as path from 'path'; 2import { TSDocParser, TSDocConfiguration } from '@microsoft/tsdoc'; 3import { TSDocConfigFile } from '@microsoft/tsdoc-config'; 4 5// Sample source file to be parsed 6const mySourceFile: string = 'my-project/src/example.ts'; 7 8// Load the nearest config file, for example `my-project/tsdoc.json` 9const tsdocConfigFile: TSDocConfigFile = TSDocConfigFile.loadForFolder(path.dirname(mySourceFile)); 10if (tsdocConfigFile.hasErrors) { 11 // Report any errors 12 console.log(tsdocConfigFile.getErrorSummary()); 13} 14 15// Use the TSDocConfigFile to configure the parser 16const tsdocConfiguration: TSDocConfiguration = new TSDocConfiguration(); 17tsdocConfigFile.configureParser(tsdocConfiguration); 18const tsdocParser: TSDocParser = new TSDocParser(tsdocConfiguration);
No vulnerabilities found.
Reason
11 commit(s) out of 30 and 1 issue activity out of 30 found in the last 90 days -- score normalized to 10
Reason
no vulnerabilities detected
Reason
no dangerous workflow patterns detected
Reason
tokens are read-only in GitHub workflows
Reason
license file detected
Details
Reason
all dependencies are pinned
Details
Reason
no binaries found in the repo
Reason
security policy file detected
Details
Reason
branch protection is not maximal on development and all release branches
Details
Reason
GitHub code reviews found for 22 commits out of the last 30 -- score normalized to 7
Details
Reason
no badge detected
Reason
no update tool detected
Details
Reason
project is not fuzzed
Score
Last Scanned on 2022-08-15
The Open Source Security Foundation is a cross-industry collaboration to improve the security of open source software (OSS). The Scorecard provides security health metrics for open source projects.
Learn More