Skip to content

Clean up public API a bit #58076

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 4 additions & 15 deletions src/compiler/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -896,6 +896,7 @@ export const enum ModifierFlags {
Modifier = All & ~Decorator,
}

/** @internal */
export const enum JsxFlags {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None = 0,
/** An element from a named property of the JSX.IntrinsicElements interface */
Expand Down Expand Up @@ -3787,6 +3788,7 @@ export interface FileReference extends TextRange {
preserve?: boolean;
}

/** @internal */
export interface CheckJsDirective extends TextRange {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

enabled: boolean;
}
Expand Down Expand Up @@ -4167,6 +4169,7 @@ export interface FlowReduceLabel extends FlowNodeBase {
antecedent: FlowNode;
}

/** @internal */
export type FlowType = Type | IncompleteType;
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably I should have noticed this in #58036, but we already make public all of the other types.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.


// Incomplete types occur during control flow analysis of loops. An IncompleteType
Expand Down Expand Up @@ -4812,21 +4815,6 @@ export interface EmitTransformers {
declarationTransformers: readonly TransformerFactory<SourceFile | Bundle>[];
}

export interface SourceMapSpan {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

/** Line number in the .js file. */
emittedLine: number;
/** Column number in the .js file. */
emittedColumn: number;
/** Line number in the .ts file. */
sourceLine: number;
/** Column number in the .ts file. */
sourceColumn: number;
/** Optional name (index into names array) associated with this span. */
nameIndex?: number;
/** .ts file (index into sources array) associated with this span */
sourceIndex: number;
}

/** @internal */
export interface SourceMapEmitResult {
inputSourceFileNames: readonly string[]; // Input source file (which one can use on program to get the file), 1:1 mapping with the sourceMap.sources list
Expand Down Expand Up @@ -6774,6 +6762,7 @@ export type TypeMapper =
| { kind: TypeMapKind.Function; func: (t: Type) => Type; debugInfo?: () => string; }
| { kind: TypeMapKind.Composite | TypeMapKind.Merged; mapper1: TypeMapper; mapper2: TypeMapper; };

/** @internal */
// dprint-ignore
export const enum InferencePriority {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

None = 0,
Expand Down
2 changes: 1 addition & 1 deletion src/server/editorServices.ts
Original file line number Diff line number Diff line change
Expand Up @@ -509,7 +509,7 @@ export function convertUserPreferences(preferences: protocol.UserPreferences): U
return userPreferences;
}

export interface HostConfiguration {
interface HostConfiguration {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

formatCodeOptions: FormatCodeSettings;
preferences: protocol.UserPreferences;
hostInfo: string;
Expand Down
2 changes: 1 addition & 1 deletion src/server/session.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,7 +298,7 @@ export function formatDiagnosticToProtocol(diag: Diagnostic, includeFileName: bo
: common;
}

export interface PendingErrorCheck {
interface PendingErrorCheck {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fileName: NormalizedPath;
project: Project;
}
Expand Down
6 changes: 0 additions & 6 deletions src/server/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ import {
WatchOptions,
} from "./_namespaces/ts";

export interface CompressedData {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

length: number;
compressionKind: string;
data: any;
}

export type ModuleImportResult = { module: {}; error: undefined; } | { module: undefined; error: { stack?: string; message?: string; }; };

/** @deprecated Use {@link ModuleImportResult} instead. */
Expand Down
12 changes: 6 additions & 6 deletions src/services/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -293,6 +293,7 @@ export const enum PackageJsonAutoImportPreference {
Auto,
}

/** @internal */
export interface PerformanceEvent {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

kind: "UpdateGraph" | "CreatePackageJsonAutoImportProvider";
durationMs: number;
Expand All @@ -304,6 +305,7 @@ export enum LanguageServiceMode {
Syntactic,
}

/** @internal */
export interface IncompleteCompletionsCache {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

get(): CompletionInfo | undefined;
set(response: CompletionInfo): void;
Expand Down Expand Up @@ -1236,6 +1238,7 @@ export interface ReferencedSymbolEntry extends ReferenceEntry {
isDefinition?: boolean;
}

/** @internal */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export enum SymbolDisplayPartKind {
aliasName,
className,
Expand Down Expand Up @@ -1275,6 +1278,7 @@ export interface SymbolDisplayPart {
kind: string;
}

/** @internal */
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

export interface JSDocLinkDisplayPart extends SymbolDisplayPart {
target: DocumentSpan;
}
Expand Down Expand Up @@ -1585,12 +1589,6 @@ export const enum OutliningSpanKind {
Imports = "imports",
}

export const enum OutputFileType {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

JavaScript,
SourceMap,
Declaration,
}

export const enum EndOfLineState {
None,
InMultiLineCommentTrivia,
Expand Down Expand Up @@ -1771,6 +1769,7 @@ export const enum ScriptElementKind {
linkText = "link text",
}

/** @internal */
export const enum ScriptElementKindModifier {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

none = "",
publicMemberModifier = "public",
Expand Down Expand Up @@ -1907,6 +1906,7 @@ export interface RefactorContext extends textChanges.TextChangesContext {
kind?: string;
}

/** @internal */
export interface InlayHintsContext {
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

file: SourceFile;
program: Program;
Expand Down
1 change: 1 addition & 0 deletions src/typingsInstallerCore/typingsInstaller.ts
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ export function getNpmCommandForInstallation(npmPath: string, tsVersion: string,

export type RequestCompletedAction = (success: boolean) => void;

/** @internal */
export interface PendingRequest {
requestId: number;
packageNames: string[];
Expand Down
Loading