remove even more redundant internal comments
This commit is contained in:
parent
772f6cdf48
commit
e2947fac1c
|
@ -2921,7 +2921,6 @@ namespace ts {
|
|||
}
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isExportsOrModuleExportsOrAlias(sourceFile: SourceFile, node: Expression): boolean {
|
||||
return isExportsIdentifier(node) ||
|
||||
isModuleExportsPropertyAccessExpression(node) ||
|
||||
|
@ -3898,7 +3897,6 @@ namespace ts {
|
|||
* For performance reasons, `computeTransformFlagsForNode` uses local constant values rather
|
||||
* than calling this function.
|
||||
*/
|
||||
/* @internal */
|
||||
export function getTransformFlagsSubtreeExclusions(kind: SyntaxKind) {
|
||||
if (kind >= SyntaxKind.FirstTypeNode && kind <= SyntaxKind.LastTypeNode) {
|
||||
return TransformFlags.TypeExcludes;
|
||||
|
|
|
@ -2052,7 +2052,6 @@ namespace ts {
|
|||
}
|
||||
|
||||
/** Represents a "prefix*suffix" pattern. */
|
||||
/* @internal */
|
||||
export interface Pattern {
|
||||
prefix: string;
|
||||
suffix: string;
|
||||
|
|
|
@ -150,14 +150,12 @@ namespace ts.sourcemaps {
|
|||
}
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export interface MappingsDecoder extends Iterator<SourceMapSpan> {
|
||||
readonly decodingIndex: number;
|
||||
readonly error: string | undefined;
|
||||
readonly lastSpan: SourceMapSpan;
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export function decodeMappings(map: SourceMapData): MappingsDecoder {
|
||||
const state: DecoderState = {
|
||||
encodedText: map.mappings,
|
||||
|
|
|
@ -22,9 +22,9 @@ namespace ts {
|
|||
force?: boolean;
|
||||
verbose?: boolean;
|
||||
|
||||
/*@internal*/ clean?: boolean;
|
||||
/*@internal*/ watch?: boolean;
|
||||
/*@internal*/ help?: boolean;
|
||||
clean?: boolean;
|
||||
watch?: boolean;
|
||||
help?: boolean;
|
||||
|
||||
preserveWatchOutput?: boolean;
|
||||
listEmittedFiles?: boolean;
|
||||
|
@ -340,18 +340,18 @@ namespace ts {
|
|||
cleanAllProjects(): ExitStatus;
|
||||
|
||||
// TODO:: All the below ones should technically only be in watch mode. but thats for later time
|
||||
/*@internal*/ resolveProjectName(name: string): ResolvedConfigFileName;
|
||||
/*@internal*/ getUpToDateStatusOfFile(configFileName: ResolvedConfigFileName): UpToDateStatus;
|
||||
/*@internal*/ getBuildGraph(configFileNames: ReadonlyArray<string>): DependencyGraph;
|
||||
resolveProjectName(name: string): ResolvedConfigFileName;
|
||||
getUpToDateStatusOfFile(configFileName: ResolvedConfigFileName): UpToDateStatus;
|
||||
getBuildGraph(configFileNames: ReadonlyArray<string>): DependencyGraph;
|
||||
|
||||
/*@internal*/ invalidateProject(configFileName: string, reloadLevel?: ConfigFileProgramReloadLevel): void;
|
||||
/*@internal*/ buildInvalidatedProject(): void;
|
||||
invalidateProject(configFileName: string, reloadLevel?: ConfigFileProgramReloadLevel): void;
|
||||
buildInvalidatedProject(): void;
|
||||
|
||||
/*@internal*/ resetBuildContext(opts?: BuildOptions): void;
|
||||
resetBuildContext(opts?: BuildOptions): void;
|
||||
}
|
||||
|
||||
export interface SolutionBuilderWithWatch extends SolutionBuilder {
|
||||
/*@internal*/ startWatching(): void;
|
||||
startWatching(): void;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -5225,7 +5225,6 @@ namespace ts {
|
|||
useCaseSensitiveFileNames(): boolean;
|
||||
getCurrentDirectory(): string;
|
||||
|
||||
/* @internal */
|
||||
isSourceFileFromExternalLibrary(file: SourceFile): boolean;
|
||||
getLibFileFromReference(ref: FileReference): SourceFile | undefined;
|
||||
|
||||
|
|
|
@ -43,7 +43,6 @@ namespace ts {
|
|||
return false;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
export const screenStartingMessageCodes: number[] = [
|
||||
Diagnostics.Starting_compilation_in_watch_mode.code,
|
||||
Diagnostics.File_change_detected_Starting_incremental_compilation.code,
|
||||
|
|
|
@ -24,13 +24,11 @@ namespace ts.JsTyping {
|
|||
version: Version;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isTypingUpToDate(cachedTyping: CachedTyping, availableTypingVersions: MapLike<string>) {
|
||||
const availableVersion = new Version(getProperty(availableTypingVersions, `ts${versionMajorMinor}`) || getProperty(availableTypingVersions, "latest")!);
|
||||
return availableVersion.compareTo(cachedTyping.version) <= 0;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export const nodeCoreModuleList: ReadonlyArray<string> = [
|
||||
"assert",
|
||||
"async_hooks",
|
||||
|
@ -70,7 +68,6 @@ namespace ts.JsTyping {
|
|||
"zlib"
|
||||
];
|
||||
|
||||
/* @internal */
|
||||
export const nodeCoreModules = arrayToSet(nodeCoreModuleList);
|
||||
|
||||
/**
|
||||
|
|
|
@ -34,7 +34,6 @@ namespace ts.server {
|
|||
: undefined;
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
export function nowString() {
|
||||
// E.g. "12:34:56.789"
|
||||
const d = new Date();
|
||||
|
|
|
@ -204,7 +204,7 @@ namespace ts.server {
|
|||
|
||||
/*@internal*/
|
||||
constructor(
|
||||
/*@internal*/readonly projectName: string,
|
||||
readonly projectName: string,
|
||||
readonly projectKind: ProjectKind,
|
||||
readonly projectService: ProjectService,
|
||||
private documentRegistry: DocumentRegistry,
|
||||
|
|
|
@ -6,7 +6,6 @@ namespace ts.server {
|
|||
|
||||
/* @internal */
|
||||
export class TextStorage {
|
||||
/*@internal*/
|
||||
version: ScriptInfoVersion;
|
||||
|
||||
/**
|
||||
|
|
|
@ -382,7 +382,6 @@ namespace ts.server {
|
|||
}
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export class LineIndex {
|
||||
root: LineNode;
|
||||
// set this to true to check each edit for accuracy
|
||||
|
|
|
@ -208,13 +208,11 @@ namespace ts.server {
|
|||
|
||||
const indentStr = "\n ";
|
||||
|
||||
/* @internal */
|
||||
export function indent(str: string): string {
|
||||
return indentStr + str.replace(/\n/g, indentStr);
|
||||
}
|
||||
|
||||
/** Put stringified JSON on the next line, indented. */
|
||||
/* @internal */
|
||||
export function stringifyIndented(json: {}): string {
|
||||
return indentStr + JSON.stringify(json);
|
||||
}
|
||||
|
|
|
@ -334,7 +334,6 @@ namespace ts.formatting {
|
|||
return 0;
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function formatNodeGivenIndentation(node: Node, sourceFileLike: SourceFileLike, languageVariant: LanguageVariant, initialIndentation: number, delta: number, formatContext: FormatContext): TextChange[] {
|
||||
const range = { pos: 0, end: sourceFileLike.text.length };
|
||||
return getFormattingScanner(sourceFileLike.text, languageVariant, range.pos, range.end, scanner => formatSpanWorker(
|
||||
|
|
|
@ -146,7 +146,7 @@ namespace ts.OrganizeImports {
|
|||
: undefined;
|
||||
}
|
||||
|
||||
/* @internal */ // Internal for testing
|
||||
// Internal for testing
|
||||
/**
|
||||
* @param importGroup a list of ImportDeclarations, all with the same module name.
|
||||
*/
|
||||
|
@ -266,7 +266,7 @@ namespace ts.OrganizeImports {
|
|||
}
|
||||
}
|
||||
|
||||
/* @internal */ // Internal for testing
|
||||
// Internal for testing
|
||||
/**
|
||||
* @param exportGroup a list of ExportDeclarations, all with the same module name.
|
||||
*/
|
||||
|
|
|
@ -461,11 +461,11 @@ namespace ts {
|
|||
};
|
||||
}
|
||||
|
||||
/* @internal */ export function breakIntoCharacterSpans(identifier: string): TextSpan[] {
|
||||
export function breakIntoCharacterSpans(identifier: string): TextSpan[] {
|
||||
return breakIntoSpans(identifier, /*word:*/ false);
|
||||
}
|
||||
|
||||
/* @internal */ export function breakIntoWordSpans(identifier: string): TextSpan[] {
|
||||
export function breakIntoWordSpans(identifier: string): TextSpan[] {
|
||||
return breakIntoSpans(identifier, /*word:*/ true);
|
||||
}
|
||||
|
||||
|
|
|
@ -140,13 +140,11 @@ namespace ts {
|
|||
return !!forEachReturnStatement(body, isReturnStatementWithFixablePromiseHandler);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function isReturnStatementWithFixablePromiseHandler(node: Node): node is ReturnStatement {
|
||||
return isReturnStatement(node) && !!node.expression && isFixablePromiseHandler(node.expression);
|
||||
}
|
||||
|
||||
// Should be kept up to date with transformExpression in convertToAsyncFunction.ts
|
||||
/* @internal */
|
||||
export function isFixablePromiseHandler(node: Node): boolean {
|
||||
// ensure outermost call exists and is a promise handler
|
||||
if (!isPromiseHandler(node) || !node.arguments.every(isFixablePromiseArgument)) {
|
||||
|
|
|
@ -1410,7 +1410,6 @@ namespace ts {
|
|||
return node.modifiers && find(node.modifiers, m => m.kind === kind);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function insertImport(changes: textChanges.ChangeTracker, sourceFile: SourceFile, importDecl: Statement): void {
|
||||
const lastImportDeclaration = findLast(sourceFile.statements, isAnyImportSyntax);
|
||||
if (lastImportDeclaration) {
|
||||
|
@ -1598,7 +1597,6 @@ namespace ts {
|
|||
return displayPart("\n", SymbolDisplayPartKind.lineBreak);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function mapToDisplayParts(writeDisplayParts: (writer: DisplayPartsSymbolWriter) => void): SymbolDisplayPart[] {
|
||||
try {
|
||||
writeDisplayParts(displayPartWriter);
|
||||
|
@ -1751,7 +1749,6 @@ namespace ts {
|
|||
/**
|
||||
* Sets EmitFlags to suppress leading and trailing trivia on the node.
|
||||
*/
|
||||
/* @internal */
|
||||
export function suppressLeadingAndTrailingTrivia(node: Node) {
|
||||
suppressLeadingTrivia(node);
|
||||
suppressTrailingTrivia(node);
|
||||
|
@ -1760,7 +1757,6 @@ namespace ts {
|
|||
/**
|
||||
* Sets EmitFlags to suppress leading trivia on the node.
|
||||
*/
|
||||
/* @internal */
|
||||
export function suppressLeadingTrivia(node: Node) {
|
||||
addEmitFlagsRecursively(node, EmitFlags.NoLeadingComments, getFirstChild);
|
||||
}
|
||||
|
@ -1768,7 +1764,6 @@ namespace ts {
|
|||
/**
|
||||
* Sets EmitFlags to suppress trailing trivia on the node.
|
||||
*/
|
||||
/* @internal */
|
||||
export function suppressTrailingTrivia(node: Node) {
|
||||
addEmitFlagsRecursively(node, EmitFlags.NoTrailingComments, getLastChild);
|
||||
}
|
||||
|
@ -1783,7 +1778,6 @@ namespace ts {
|
|||
return node.forEachChild(child => child);
|
||||
}
|
||||
|
||||
/* @internal */
|
||||
export function getUniqueName(baseName: string, sourceFile: SourceFile): string {
|
||||
let nameText = baseName;
|
||||
for (let i = 1; !isFileLevelUniqueName(sourceFile, nameText); i++) {
|
||||
|
@ -1797,7 +1791,6 @@ namespace ts {
|
|||
* to be on the reference, rather than the declaration, because it's closer to where the
|
||||
* user was before extracting it.
|
||||
*/
|
||||
/* @internal */
|
||||
export function getRenameLocation(edits: ReadonlyArray<FileTextChanges>, renameFilename: string, name: string, preferLastLocation: boolean): number {
|
||||
let delta = 0;
|
||||
let lastPos = -1;
|
||||
|
|
Loading…
Reference in a new issue