Skip to content

Commit 23dd1fa

Browse files
authored
Merge pull request microsoft#1377 from microsoft/octogonz/ae-clarify-docs
[api-extractor] Clarify the "--typescript-compiler-folder" docs
2 parents 2c941e2 + 312c454 commit 23dd1fa

3 files changed

Lines changed: 31 additions & 9 deletions

File tree

apps/api-extractor/src/api/Extractor.ts

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -37,9 +37,11 @@ export interface IExtractorInvokeOptions {
3737

3838
/**
3939
* Indicates that API Extractor is running as part of a local build, e.g. on developer's
40-
* machine. This disables certain validation that would normally be performed
41-
* for a ship/production build. For example, the *.api.md report file is
42-
* automatically updated in a local build.
40+
* machine.
41+
*
42+
* @remarks
43+
* This disables certain validation that would normally be performed for a ship/production build. For example,
44+
* the *.api.md report file is automatically updated in a local build.
4345
*
4446
* The default value is false.
4547
*/
@@ -53,14 +55,21 @@ export interface IExtractorInvokeOptions {
5355
/**
5456
* If true, API Extractor will print diagnostic information used for troubleshooting problems.
5557
* These messages will be included as {@link ExtractorLogLevel.Verbose} output.
58+
*
59+
* @remarks
5660
* Setting `showDiagnostics=true` forces `showVerboseMessages=true`.
5761
*/
5862
showDiagnostics?: boolean;
5963

6064
/**
61-
* By default API Extractor uses its own TypeScript compiler version to analyze your project.
62-
* This can often cause compiler errors due to incompatibilities between different TS versions.
63-
* Use this option to specify the folder path for your compiler version.
65+
* Specifies an alternate folder path to be used when loading the TypeScript system typings.
66+
*
67+
* @remarks
68+
* API Extractor uses its own TypeScript compiler engine to analyze your project. If your project
69+
* is built with a significantly different TypeScript version, sometimes API Extractor may report compilation
70+
* errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the "--typescriptCompilerFolder"
71+
* option to specify the folder path where you installed the TypeScript package, and API Extractor's compiler will
72+
* use those system typings instead.
6473
*/
6574
typescriptCompilerFolder?: string;
6675

apps/api-extractor/src/cli/RunAction.ts

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -69,9 +69,11 @@ export class RunAction extends CommandLineAction {
6969
this._typescriptCompilerFolder = this.defineStringParameter({
7070
parameterLongName: '--typescript-compiler-folder',
7171
argumentName: 'PATH',
72-
description: 'By default API Extractor uses its own TypeScript compiler version to analyze your project.'
73-
+ ' This can often cause compiler errors due to incompatibilities between different TS versions.'
74-
+ ' Use "--typescript-compiler-folder" to specify the folder path for your compiler version.'
72+
description: 'API Extractor uses its own TypeScript compiler engine to analyze your project. If your project'
73+
+ ' is built with a significantly different TypeScript version, sometimes API Extractor may report compilation'
74+
+ ' errors due to differences in the system typings (e.g. lib.dom.d.ts). You can use the'
75+
+ ' "--typescriptCompilerFolder" option to specify the folder path where you installed the TypeScript package,'
76+
+ ' and API Extractor\'s compiler will use those system typings instead.'
7577
});
7678
}
7779

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
{
2+
"changes": [
3+
{
4+
"packageName": "@microsoft/api-extractor",
5+
"comment": "Clarify docs for \"--typescript-compiler-folder\"",
6+
"type": "patch"
7+
}
8+
],
9+
"packageName": "@microsoft/api-extractor",
10+
"email": "4673363+octogonz@users.noreply.github.com"
11+
}

0 commit comments

Comments
 (0)