Skip to content

Commit d668e08

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 api-extractor to produce out final merged d.ts files, 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 1993fa1 commit d668e08

Some content is hidden

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

90 files changed

+2667
-2073
lines changed

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 {
@@ -803,15 +804,17 @@ export type ProgramBuildInfoBuilderStateFileInfo = Omit<BuilderState.FileInfo, "
803804
*/
804805
signature: string | false | undefined;
805806
};
806-
/** @internal */
807807
/**
808808
* [fileId, signature] if different from file's signature
809809
* fileId if file wasnt emitted
810+
*
811+
* @internal
810812
*/
811813
export type ProgramBuildInfoEmitSignature = ProgramBuildInfoFileId | [fileId: ProgramBuildInfoFileId, signature: string];
812-
/** @internal */
813814
/**
814815
* ProgramBuildInfoFileInfo is string if FileInfo.version === FileInfo.signature && !FileInfo.affectsGlobalScope otherwise encoded FileInfo
816+
*
817+
* @internal
815818
*/
816819
export type ProgramBuildInfoFileInfo = string | ProgramBuildInfoBuilderStateFileInfo;
817820
/** @internal */

src/compiler/builderPublic.ts

+11-11
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,31 @@ export interface BuilderProgramHost {
2424
/**
2525
* disable using source file version as signature for testing
2626
*/
27-
/*@internal*/
27+
/** @internal */
2828
disableUseFileVersionAsSignature?: boolean;
2929
/**
3030
* Store the list of files that update signature during the emit
3131
*/
32-
/*@internal*/
32+
/** @internal */
3333
storeFilesChangingSignatureDuringEmit?: boolean;
3434
/**
3535
* Gets the current time
3636
*/
37-
/*@internal*/
37+
/** @internal */
3838
now?(): Date;
3939
}
4040

4141
/**
4242
* Builder to manage the program state changes
4343
*/
4444
export interface BuilderProgram {
45-
/*@internal*/
45+
/** @internal */
4646
getState(): ReusableBuilderProgramState;
47-
/*@internal*/
47+
/** @internal */
4848
saveEmitState(): SavedBuildProgramEmitState;
49-
/*@internal*/
49+
/** @internal */
5050
restoreEmitState(saved: SavedBuildProgramEmitState): void;
51-
/*@internal*/
51+
/** @internal */
5252
hasChangedEmitSignature?(): boolean;
5353
/**
5454
* Returns current program
@@ -57,12 +57,12 @@ export interface BuilderProgram {
5757
/**
5858
* Returns current program that could be undefined if the program was released
5959
*/
60-
/*@internal*/
60+
/** @internal */
6161
getProgramOrUndefined(): Program | undefined;
6262
/**
6363
* Releases reference to the program, making all the other operations that need program to fail.
6464
*/
65-
/*@internal*/
65+
/** @internal */
6666
releaseProgram(): void;
6767
/**
6868
* Get compiler options of the program
@@ -122,13 +122,13 @@ export interface BuilderProgram {
122122
* in that order would be used to write the files
123123
*/
124124
emit(targetSourceFile?: SourceFile, writeFile?: WriteFileCallback, cancellationToken?: CancellationToken, emitOnlyDtsFiles?: boolean, customTransformers?: CustomTransformers): EmitResult;
125-
/*@internal*/
125+
/** @internal */
126126
emitBuildInfo(writeFile?: WriteFileCallback, cancellationToken?: CancellationToken): EmitResult;
127127
/**
128128
* Get the current directory of the program
129129
*/
130130
getCurrentDirectory(): string;
131-
/*@internal*/
131+
/** @internal */
132132
close(): void;
133133
}
134134

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)