Skip to content

Commit 55034d7

Browse files
committed
Fix all internal JSDoc comments
If these are regular comments, then they won't appear in our d.ts files. But, now we are relying on an external d.ts bundler to produce our final merged, so they need to be present in the "input" d.ts files, meaning they have to be JSDoc comments. These comments only work today because all of our builds load their TS files from scratch, so they see the actual source files and their non-JSDoc comments. The comments also need to be attached to a declaration, not floating, otherwise they won't be used by api-extractor, so move them if needed.
1 parent 763d093 commit 55034d7

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+2818
-2096
lines changed

scripts/failed-tests.cjs

+1
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ const os = require("os");
1010
reporter?: Mocha.ReporterConstructor | keyof Mocha.reporters;
1111
reporterOptions?: any; // TODO(jakebailey): what?
1212
}} ReporterOptions */
13+
void 0;
1314

1415
/**
1516
* .failed-tests reporter

scripts/processDiagnosticMessages.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import fs from "fs";
99
isEarly?: boolean;
1010
elidedInCompatabilityPyramid?: boolean;
1111
}} DiagnosticDetails */
12+
void 0;
1213

1314
/** @typedef {Map<string, DiagnosticDetails>} InputDiagnosticMessageTable */
1415

scripts/word2md.mjs

+1
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,7 @@ const sys = (() => {
6060
subscript?: boolean;
6161
};
6262
}} FindReplaceOptions */
63+
void 0;
6364

6465
/**
6566
* @param {Word.Document} doc

src/compiler/builder.ts

+6-3
Original file line numberDiff line numberDiff line change
@@ -92,9 +92,10 @@ export const enum BuilderFileEmit {
9292
Full
9393
}
9494

95-
/** @internal */
9695
/**
9796
* State to store the changed files, affected files and cache semantic diagnostics
97+
*
98+
* @internal
9899
*/
99100
// TODO: GH#18217 Properties of this interface are frequently asserted to be defined.
100101
export interface BuilderProgramState extends BuilderState, ReusableBuilderProgramState {
@@ -809,15 +810,17 @@ export type ProgramBuildInfoBuilderStateFileInfo = Omit<BuilderState.FileInfo, "
809810
*/
810811
signature: string | false | undefined;
811812
};
812-
/** @internal */
813813
/**
814814
* [fileId, signature] if different from file's signature
815815
* fileId if file wasnt emitted
816+
*
817+
* @internal
816818
*/
817819
export type ProgramBuildInfoEmitSignature = ProgramBuildInfoFileId | [fileId: ProgramBuildInfoFileId, signature: string];
818-
/** @internal */
819820
/**
820821
* ProgramBuildInfoFileInfo is string if FileInfo.version === FileInfo.signature && !FileInfo.affectsGlobalScope otherwise encoded FileInfo
822+
*
823+
* @internal
821824
*/
822825
export type ProgramBuildInfoFileInfo = string | ProgramBuildInfoBuilderStateFileInfo;
823826
/** @internal */

src/compiler/builderPublic.ts

+16-11
Original file line numberDiff line numberDiff line change
@@ -23,46 +23,51 @@ export interface BuilderProgramHost {
2323
writeFile?: WriteFileCallback;
2424
/**
2525
* disable using source file version as signature for testing
26+
*
27+
* @internal
2628
*/
27-
/*@internal*/
2829
disableUseFileVersionAsSignature?: boolean;
2930
/**
3031
* Store the list of files that update signature during the emit
32+
*
33+
* @internal
3134
*/
32-
/*@internal*/
3335
storeFilesChangingSignatureDuringEmit?: boolean;
3436
/**
3537
* Gets the current time
38+
*
39+
* @internal
3640
*/
37-
/*@internal*/
3841
now?(): Date;
3942
}
4043

4144
/**
4245
* Builder to manage the program state changes
4346
*/
4447
export interface BuilderProgram {
45-
/*@internal*/
48+
/** @internal */
4649
getState(): ReusableBuilderProgramState;
47-
/*@internal*/
50+
/** @internal */
4851
saveEmitState(): SavedBuildProgramEmitState;
49-
/*@internal*/
52+
/** @internal */
5053
restoreEmitState(saved: SavedBuildProgramEmitState): void;
51-
/*@internal*/
54+
/** @internal */
5255
hasChangedEmitSignature?(): boolean;
5356
/**
5457
* Returns current program
5558
*/
5659
getProgram(): Program;
5760
/**
5861
* Returns current program that could be undefined if the program was released
62+
*
63+
* @internal
5964
*/
60-
/*@internal*/
6165
getProgramOrUndefined(): Program | undefined;
6266
/**
6367
* Releases reference to the program, making all the other operations that need program to fail.
68+
*
69+
* @internal
6470
*/
65-
/*@internal*/
6671
releaseProgram(): void;
6772
/**
6873
* Get compiler options of the program
@@ -122,13 +127,13 @@ export interface BuilderProgram {
122127
* in that order would be used to write the files
123128
*/
124129
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
125-
/*@internal*/
130+
/** @internal */
126131
emitBuildInfo(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
127132
/**
128133
* Get the current directory of the program
129134
*/
130135
getCurrentDirectory(): string;
131-
/*@internal*/
136+
/** @internal */
132137
close(): void;
133138
}
134139

src/compiler/builderStatePublic.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ import { BuildInfo, Diagnostic } from "./_namespaces/ts";
33
export interface EmitOutput {
44
outputFiles: OutputFile[];
55
emitSkipped: boolean;
6-
/* @internal */ diagnostics: readonly Diagnostic[];
6+
/** @internal */ diagnostics: readonly Diagnostic[];
77
}
88

99
export interface OutputFile {
1010
name: string;
1111
writeByteOrderMark: boolean;
1212
text: string;
13-
/* @internal */ buildInfo?: BuildInfo
13+
/** @internal */ buildInfo?: BuildInfo
1414
}

0 commit comments

Comments
 (0)