mirror of
https://github.com/microsoft/TypeScript.git
synced 2025-12-13 04:57:55 -06:00
Fix JSDoc eslint rule for properties and methods (#51462)
This commit is contained in:
parent
d237468cda
commit
0993c017ba
@ -172,6 +172,8 @@ module.exports = createRule({
|
||||
TSIndexSignature: checkDeclaration,
|
||||
TSMethodSignature: checkDeclaration,
|
||||
TSParameterProperty: checkDeclaration,
|
||||
PropertyDefinition: checkDeclaration,
|
||||
MethodDefinition: checkDeclaration,
|
||||
};
|
||||
},
|
||||
});
|
||||
|
||||
@ -718,8 +718,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Container of all known scripts
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
readonly filenameToScriptInfo = new Map<string, ScriptInfo>();
|
||||
private readonly nodeModulesWatchers = new Map<string, NodeModulesWatcher>();
|
||||
/**
|
||||
@ -733,8 +734,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Map to the real path of the infos
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
readonly realpathToScriptInfos: MultiMap<Path, ScriptInfo> | undefined;
|
||||
/**
|
||||
* maps external project file name to list of config files that were the part of this project
|
||||
@ -786,8 +788,11 @@ export class ProjectService {
|
||||
* In this case the exists could be true/false based on config file is present or not
|
||||
* - Or it is present if we have configured project open with config file at that location
|
||||
* In this case the exists property is always true
|
||||
*
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */ readonly configFileExistenceInfoCache = new Map<NormalizedPath, ConfigFileExistenceInfo>();
|
||||
readonly configFileExistenceInfoCache = new Map<NormalizedPath, ConfigFileExistenceInfo>();
|
||||
/** @internal */ readonly throttledOperations: ThrottledOperations;
|
||||
|
||||
private readonly hostConfiguration: HostConfiguration;
|
||||
@ -1344,8 +1349,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* This is to watch whenever files are added or removed to the wildcard directories
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
private watchWildcardDirectory(directory: Path, flags: WatchDirectoryFlags, configFileName: NormalizedPath, config: ParsedConfig) {
|
||||
return this.watchFactory.watchDirectory(
|
||||
directory,
|
||||
@ -1774,8 +1780,9 @@ export class ProjectService {
|
||||
/**
|
||||
* Close the config file watcher in the cached ConfigFileExistenceInfo
|
||||
* if there arent any open files that are root of inferred project and there is no parsed config held by any project
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
private closeConfigFileWatcherOnReleaseOfOpenFile(configFileExistenceInfo: ConfigFileExistenceInfo) {
|
||||
// Close the config file watcher if there are no more open files that are root of inferred project
|
||||
// or if there are no projects that need to watch this config file existence info
|
||||
@ -1822,8 +1829,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* This is called by inferred project whenever script info is added as a root
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
startWatchingConfigFilesForInferredProjectRoot(info: ScriptInfo) {
|
||||
Debug.assert(info.isScriptOpen());
|
||||
this.forEachConfigFileLocation(info, (canonicalConfigFilePath, configFileName) => {
|
||||
@ -1852,8 +1860,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* This is called by inferred project whenever root script info is removed from it
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
stopWatchingConfigFilesForInferredProjectRoot(info: ScriptInfo) {
|
||||
this.forEachConfigFileLocation(info, canonicalConfigFilePath => {
|
||||
const configFileExistenceInfo = this.configFileExistenceInfoCache.get(canonicalConfigFilePath);
|
||||
@ -2168,8 +2177,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Read the config file of the project, and update the project root file names.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
private loadConfiguredProject(project: ConfiguredProject, reason: string) {
|
||||
tracing?.push(tracing.Phase.Session, "loadConfiguredProject", { configFilePath: project.canonicalConfigFilePath });
|
||||
this.sendProjectLoadingStartEvent(project, reason);
|
||||
@ -2434,8 +2444,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Reload the file names from config file specs and update the project graph
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
reloadFileNamesOfConfiguredProject(project: ConfiguredProject) {
|
||||
const fileNames = this.reloadFileNamesOfParsedConfig(project.getConfigFilePath(), this.configFileExistenceInfoCache.get(project.canonicalConfigFilePath)!.config!);
|
||||
project.updateErrorOnNoInputFiles(fileNames);
|
||||
@ -2466,8 +2477,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Read the config file of the project again by clearing the cache and update the project graph
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
reloadConfiguredProject(project: ConfiguredProject, reason: string, isInitialLoad: boolean, clearSemanticCache: boolean) {
|
||||
// At this point, there is no reason to not have configFile in the host
|
||||
const host = project.getCachedDirectoryStructureHost();
|
||||
@ -2632,8 +2644,9 @@ export class ProjectService {
|
||||
/**
|
||||
* Returns the projects that contain script info through SymLink
|
||||
* Note that this does not return projects in info.containingProjects
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
getSymlinkedProjects(info: ScriptInfo): MultiMap<Path, Project> | undefined {
|
||||
let projects: MultiMap<Path, Project> | undefined;
|
||||
if (this.realpathToScriptInfos) {
|
||||
@ -4149,8 +4162,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Waits for any ongoing plugin enablement requests to complete.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
async waitForPendingPlugins() {
|
||||
while (this.currentPluginEnablementPromise) {
|
||||
await this.currentPluginEnablementPromise;
|
||||
@ -4159,8 +4173,9 @@ export class ProjectService {
|
||||
|
||||
/**
|
||||
* Starts enabling any requested plugins without waiting for the result.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
enableRequestedPlugins() {
|
||||
if (this.pendingPluginEnablements) {
|
||||
void this.enableRequestedPluginsAsync();
|
||||
|
||||
@ -175,14 +175,15 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
private missingFilesMap: ESMap<Path, FileWatcher> | undefined;
|
||||
private generatedFilesMap: GeneratedFileWatcherMap | undefined;
|
||||
|
||||
/*@internal*/
|
||||
/** @internal */
|
||||
protected readonly plugins: PluginModuleWithName[] = [];
|
||||
|
||||
/** @internal */
|
||||
/**
|
||||
* This is map from files to unresolved imports in it
|
||||
* Maop does not contain entries for files that do not have unresolved imports
|
||||
* This helps in containing the set of files to invalidate
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
cachedUnresolvedImportsPerFile = new Map<Path, readonly string[]>();
|
||||
|
||||
@ -1642,7 +1643,7 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
return !!this.program && this.program.isSourceOfProjectReferenceRedirect(fileName);
|
||||
}
|
||||
|
||||
/*@internal*/
|
||||
/** @internal */
|
||||
protected getGlobalPluginSearchPaths() {
|
||||
// Search any globally-specified probe paths, then our peer node_modules
|
||||
return [
|
||||
@ -1679,8 +1680,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
|
||||
/**
|
||||
* Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin synchronously using 'require'.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
beginEnablePluginSync(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined): BeginEnablePluginResult {
|
||||
Debug.assertIsDefined(this.projectService.host.require);
|
||||
|
||||
@ -1696,8 +1698,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
|
||||
/**
|
||||
* Performs the initial steps of enabling a plugin by finding and instantiating the module for a plugin asynchronously using dynamic `import`.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
async beginEnablePluginAsync(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined): Promise<BeginEnablePluginResult> {
|
||||
Debug.assertIsDefined(this.projectService.host.importPlugin);
|
||||
|
||||
@ -1719,8 +1722,9 @@ export abstract class Project implements LanguageServiceHost, ModuleResolutionHo
|
||||
|
||||
/**
|
||||
* Performs the remaining steps of enabling a plugin after its module has been instantiated.
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
/** @internal */
|
||||
endEnablePlugin({ pluginConfigEntry, pluginConfigOverrides, resolvedModule, errorLogs }: BeginEnablePluginResult) {
|
||||
if (resolvedModule) {
|
||||
const configurationOverride = pluginConfigOverrides && pluginConfigOverrides.get(pluginConfigEntry.name);
|
||||
@ -2015,8 +2019,11 @@ export class InferredProject extends Project {
|
||||
/** this is canonical project root path */
|
||||
readonly projectRootPath: string | undefined;
|
||||
|
||||
/** @internal */
|
||||
/** stored only if their is no projectRootPath and this isnt single inferred project */
|
||||
/**
|
||||
* stored only if their is no projectRootPath and this isnt single inferred project
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
readonly canonicalCurrentDirectory: string | undefined;
|
||||
|
||||
/** @internal */
|
||||
@ -2412,8 +2419,11 @@ export class ConfiguredProject extends Project {
|
||||
|
||||
private projectReferences: readonly ProjectReference[] | undefined;
|
||||
|
||||
/** Potential project references before the project is actually loaded (read config file) */
|
||||
/** @internal */
|
||||
/**
|
||||
* Potential project references before the project is actually loaded (read config file)
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
potentialProjectReferences: Set<string> | undefined;
|
||||
|
||||
/** @internal */
|
||||
@ -2630,8 +2640,11 @@ export class ConfiguredProject extends Project {
|
||||
!this.canConfigFileJsonReportNoInputFiles;
|
||||
}
|
||||
|
||||
/** @internal */
|
||||
/** Find the configured project from the project references in project which contains the info directly */
|
||||
/**
|
||||
* Find the configured project from the project references in project which contains the info directly
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
getDefaultChildProjectFromProjectWithReferences(info: ScriptInfo) {
|
||||
return forEachResolvedProjectReferenceProject(
|
||||
this,
|
||||
@ -2643,8 +2656,11 @@ export class ConfiguredProject extends Project {
|
||||
);
|
||||
}
|
||||
|
||||
/** Returns true if the project is needed by any of the open script info/external project */
|
||||
/** @internal */
|
||||
/**
|
||||
* Returns true if the project is needed by any of the open script info/external project
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
hasOpenRef() {
|
||||
if (!!this.externalProjectRefCount) {
|
||||
return true;
|
||||
|
||||
@ -317,8 +317,11 @@ export class ScriptInfo {
|
||||
/** @internal */
|
||||
readonly isDynamic: boolean;
|
||||
|
||||
/** @internal */
|
||||
/** Set to real path if path is different from info.path */
|
||||
/**
|
||||
* Set to real path if path is different from info.path
|
||||
*
|
||||
* @internal
|
||||
*/
|
||||
private realpath: Path | undefined;
|
||||
|
||||
/** @internal */
|
||||
|
||||
@ -3127,7 +3127,6 @@ declare namespace ts {
|
||||
private externalFiles;
|
||||
private missingFilesMap;
|
||||
private generatedFilesMap;
|
||||
protected readonly plugins: PluginModuleWithName[];
|
||||
protected languageService: LanguageService;
|
||||
languageServiceEnabled: boolean;
|
||||
readonly trace?: (s: string) => void;
|
||||
@ -3252,7 +3251,6 @@ declare namespace ts {
|
||||
setTypeAcquisition(newTypeAcquisition: TypeAcquisition | undefined): void;
|
||||
getTypeAcquisition(): ts.TypeAcquisition;
|
||||
protected removeRoot(info: ScriptInfo): void;
|
||||
protected getGlobalPluginSearchPaths(): string[];
|
||||
protected enableGlobalPlugins(options: CompilerOptions, pluginConfigOverrides: Map<any> | undefined): void;
|
||||
protected enablePlugin(pluginConfigEntry: PluginImport, searchPaths: string[], pluginConfigOverrides: Map<any> | undefined): void;
|
||||
private enableProxy;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user