@@ -2124,7 +2124,7 @@ export class InferredProject extends Project {
21242124 }
21252125 }
21262126
2127- setCompilerOptions ( options ?: CompilerOptions ) {
2127+ override setCompilerOptions ( options ?: CompilerOptions ) {
21282128 // Avoid manipulating the given options directly
21292129 if ( ! options && ! this . getCompilationSettings ( ) ) {
21302130 return ;
@@ -2180,7 +2180,7 @@ export class InferredProject extends Project {
21802180 this . enableGlobalPlugins ( this . getCompilerOptions ( ) , pluginConfigOverrides ) ;
21812181 }
21822182
2183- addRoot ( info : ScriptInfo ) {
2183+ override addRoot ( info : ScriptInfo ) {
21842184 Debug . assert ( info . isScriptOpen ( ) ) ;
21852185 this . projectService . startWatchingConfigFilesForInferredProjectRoot ( info ) ;
21862186 if ( ! this . _isJsInferredProject && info . isJavaScript ( ) ) {
@@ -2189,7 +2189,7 @@ export class InferredProject extends Project {
21892189 super . addRoot ( info ) ;
21902190 }
21912191
2192- removeRoot ( info : ScriptInfo ) {
2192+ override removeRoot ( info : ScriptInfo ) {
21932193 this . projectService . stopWatchingConfigFilesForInferredProjectRoot ( info ) ;
21942194 super . removeRoot ( info ) ;
21952195 if ( this . _isJsInferredProject && info . isJavaScript ( ) ) {
@@ -2200,7 +2200,7 @@ export class InferredProject extends Project {
22002200 }
22012201
22022202 /** @internal */
2203- isOrphan ( ) {
2203+ override isOrphan ( ) {
22042204 return ! this . hasRoots ( ) ;
22052205 }
22062206
@@ -2212,12 +2212,12 @@ export class InferredProject extends Project {
22122212 this . getRootScriptInfos ( ) . length === 1 ;
22132213 }
22142214
2215- close ( ) {
2215+ override close ( ) {
22162216 forEach ( this . getRootScriptInfos ( ) , info => this . projectService . stopWatchingConfigFilesForInferredProjectRoot ( info ) ) ;
22172217 super . close ( ) ;
22182218 }
22192219
2220- getTypeAcquisition ( ) : TypeAcquisition {
2220+ override getTypeAcquisition ( ) : TypeAcquisition {
22212221 return this . typeAcquisition || {
22222222 enable : allRootFilesAreJsOrDts ( this ) ,
22232223 include : ts . emptyArray ,
@@ -2241,12 +2241,12 @@ class AuxiliaryProject extends Project {
22412241 /*currentDirectory*/ undefined ) ;
22422242 }
22432243
2244- isOrphan ( ) : boolean {
2244+ override isOrphan ( ) : boolean {
22452245 return true ;
22462246 }
22472247
22482248 /** @internal */
2249- scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2249+ override scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
22502250 // Invalidation will happen on-demand as part of updateGraph
22512251 return ;
22522252 }
@@ -2436,11 +2436,11 @@ export class AutoImportProviderProject extends Project {
24362436 return ! some ( this . rootFileNames ) ;
24372437 }
24382438
2439- isOrphan ( ) {
2439+ override isOrphan ( ) {
24402440 return true ;
24412441 }
24422442
2443- updateGraph ( ) {
2443+ override updateGraph ( ) {
24442444 let rootFileNames = this . rootFileNames ;
24452445 if ( ! rootFileNames ) {
24462446 rootFileNames = AutoImportProviderProject . getRootFileNames (
@@ -2461,62 +2461,62 @@ export class AutoImportProviderProject extends Project {
24612461 }
24622462
24632463 /** @internal */
2464- scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2464+ override scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
24652465 // Invalidation will happen on-demand as part of updateGraph
24662466 return ;
24672467 }
24682468
2469- hasRoots ( ) {
2469+ override hasRoots ( ) {
24702470 return ! ! this . rootFileNames ?. length ;
24712471 }
24722472
2473- markAsDirty ( ) {
2473+ override markAsDirty ( ) {
24742474 this . rootFileNames = undefined ;
24752475 super . markAsDirty ( ) ;
24762476 }
24772477
2478- getScriptFileNames ( ) {
2478+ override getScriptFileNames ( ) {
24792479 return this . rootFileNames || ts . emptyArray ;
24802480 }
24812481
2482- getLanguageService ( ) : never {
2482+ override getLanguageService ( ) : never {
24832483 throw new Error ( "AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`." ) ;
24842484 }
24852485
24862486 /** @internal */
2487- onAutoImportProviderSettingsChanged ( ) : never {
2487+ override onAutoImportProviderSettingsChanged ( ) : never {
24882488 throw new Error ( "AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead." ) ;
24892489 }
24902490
24912491 /** @internal */
2492- onPackageJsonChange ( ) : never {
2492+ override onPackageJsonChange ( ) : never {
24932493 throw new Error ( "package.json changes should be notified on an AutoImportProvider's host project" ) ;
24942494 }
24952495
2496- getModuleResolutionHostForAutoImportProvider ( ) : never {
2496+ override getModuleResolutionHostForAutoImportProvider ( ) : never {
24972497 throw new Error ( "AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead." ) ;
24982498 }
24992499
2500- getProjectReferences ( ) {
2500+ override getProjectReferences ( ) {
25012501 return this . hostProject . getProjectReferences ( ) ;
25022502 }
25032503
25042504 /** @internal */
2505- includePackageJsonAutoImports ( ) {
2505+ override includePackageJsonAutoImports ( ) {
25062506 return PackageJsonAutoImportPreference . Off ;
25072507 }
25082508
2509- getTypeAcquisition ( ) : TypeAcquisition {
2509+ override getTypeAcquisition ( ) : TypeAcquisition {
25102510 return { enable : false } ;
25112511 }
25122512
25132513 /** @internal */
2514- getSymlinkCache ( ) {
2514+ override getSymlinkCache ( ) {
25152515 return this . hostProject . getSymlinkCache ( ) ;
25162516 }
25172517
25182518 /** @internal */
2519- getModuleResolutionCache ( ) {
2519+ override getModuleResolutionCache ( ) {
25202520 return this . hostProject . getCurrentProgram ( ) ?. getModuleResolutionCache ( ) ;
25212521 }
25222522}
@@ -2554,7 +2554,7 @@ export class ConfiguredProject extends Project {
25542554 projectOptions ?: ProjectOptions | true ;
25552555
25562556 /** @internal */
2557- isInitialLoadPending : ( ) => boolean = returnTrue ;
2557+ override isInitialLoadPending : ( ) => boolean = returnTrue ;
25582558
25592559 /** @internal */
25602560 sendLoadingProjectFinish = false ;
@@ -2593,12 +2593,12 @@ export class ConfiguredProject extends Project {
25932593 }
25942594
25952595 /** @internal */
2596- useSourceOfProjectReferenceRedirect ( ) {
2596+ override useSourceOfProjectReferenceRedirect ( ) {
25972597 return this . languageServiceEnabled ;
25982598 }
25992599
26002600 /** @internal */
2601- getParsedCommandLine ( fileName : string ) {
2601+ override getParsedCommandLine ( fileName : string ) {
26022602 const configFileName = asNormalizedPath ( normalizePath ( fileName ) ) ;
26032603 const canonicalConfigFilePath = asNormalizedPath ( this . projectService . toCanonicalFileName ( configFileName ) ) ;
26042604 // Ensure the config file existience info is cached
@@ -2630,7 +2630,7 @@ export class ConfiguredProject extends Project {
26302630 * If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph
26312631 * @returns : true if set of files in the project stays the same and false - otherwise.
26322632 */
2633- updateGraph ( ) : boolean {
2633+ override updateGraph ( ) : boolean {
26342634 const isInitialLoad = this . isInitialLoadPending ( ) ;
26352635 this . isInitialLoadPending = returnFalse ;
26362636 const reloadLevel = this . pendingReload ;
@@ -2658,15 +2658,15 @@ export class ConfiguredProject extends Project {
26582658 }
26592659
26602660 /** @internal */
2661- getCachedDirectoryStructureHost ( ) {
2661+ override getCachedDirectoryStructureHost ( ) {
26622662 return this . directoryStructureHost as CachedDirectoryStructureHost ;
26632663 }
26642664
26652665 getConfigFilePath ( ) {
26662666 return asNormalizedPath ( this . getProjectName ( ) ) ;
26672667 }
26682668
2669- getProjectReferences ( ) : readonly ProjectReference [ ] | undefined {
2669+ override getProjectReferences ( ) : readonly ProjectReference [ ] | undefined {
26702670 return this . projectReferences ;
26712671 }
26722672
@@ -2682,7 +2682,7 @@ export class ConfiguredProject extends Project {
26822682 }
26832683
26842684 /** @internal */
2685- getResolvedProjectReferenceToRedirect ( fileName : string ) : ResolvedProjectReference | undefined {
2685+ override getResolvedProjectReferenceToRedirect ( fileName : string ) : ResolvedProjectReference | undefined {
26862686 const program = this . getCurrentProgram ( ) ;
26872687 return program && program . getResolvedProjectReferenceToRedirect ( fileName ) ;
26882688 }
@@ -2724,22 +2724,22 @@ export class ConfiguredProject extends Project {
27242724 /**
27252725 * Get the errors that dont have any file name associated
27262726 */
2727- getGlobalProjectErrors ( ) : readonly Diagnostic [ ] {
2727+ override getGlobalProjectErrors ( ) : readonly Diagnostic [ ] {
27282728 return filter ( this . projectErrors , diagnostic => ! diagnostic . file ) || emptyArray ;
27292729 }
27302730
27312731 /**
27322732 * Get all the project errors
27332733 */
2734- getAllProjectErrors ( ) : readonly Diagnostic [ ] {
2734+ override getAllProjectErrors ( ) : readonly Diagnostic [ ] {
27352735 return this . projectErrors || emptyArray ;
27362736 }
27372737
2738- setProjectErrors ( projectErrors : Diagnostic [ ] ) {
2738+ override setProjectErrors ( projectErrors : Diagnostic [ ] ) {
27392739 this . projectErrors = projectErrors ;
27402740 }
27412741
2742- close ( ) {
2742+ override close ( ) {
27432743 this . projectService . configFileExistenceInfoCache . forEach ( ( _configFileExistenceInfo , canonicalConfigFilePath ) =>
27442744 this . releaseParsedConfig ( canonicalConfigFilePath ) ) ;
27452745 this . projectErrors = undefined ;
@@ -2848,7 +2848,7 @@ export class ExternalProject extends Project {
28482848 documentRegistry : DocumentRegistry ,
28492849 compilerOptions : CompilerOptions ,
28502850 lastFileExceededProgramSize : string | undefined ,
2851- public compileOnSaveEnabled : boolean ,
2851+ public override compileOnSaveEnabled : boolean ,
28522852 projectFilePath ?: string ,
28532853 pluginConfigOverrides ?: Map < string , any > ,
28542854 watchOptions ?: WatchOptions ) {
@@ -2866,13 +2866,13 @@ export class ExternalProject extends Project {
28662866 this . enableGlobalPlugins ( this . getCompilerOptions ( ) , pluginConfigOverrides ) ;
28672867 }
28682868
2869- updateGraph ( ) {
2869+ override updateGraph ( ) {
28702870 const result = super . updateGraph ( ) ;
28712871 this . projectService . sendProjectTelemetry ( this ) ;
28722872 return result ;
28732873 }
28742874
2875- getExcludedFiles ( ) {
2875+ override getExcludedFiles ( ) {
28762876 return this . excludedFiles ;
28772877 }
28782878}
0 commit comments