@@ -2124,7 +2124,7 @@ export class InferredProject extends Project {
2124
2124
}
2125
2125
}
2126
2126
2127
- setCompilerOptions ( options ?: CompilerOptions ) {
2127
+ override setCompilerOptions ( options ?: CompilerOptions ) {
2128
2128
// Avoid manipulating the given options directly
2129
2129
if ( ! options && ! this . getCompilationSettings ( ) ) {
2130
2130
return ;
@@ -2180,7 +2180,7 @@ export class InferredProject extends Project {
2180
2180
this . enableGlobalPlugins ( this . getCompilerOptions ( ) , pluginConfigOverrides ) ;
2181
2181
}
2182
2182
2183
- addRoot ( info : ScriptInfo ) {
2183
+ override addRoot ( info : ScriptInfo ) {
2184
2184
Debug . assert ( info . isScriptOpen ( ) ) ;
2185
2185
this . projectService . startWatchingConfigFilesForInferredProjectRoot ( info ) ;
2186
2186
if ( ! this . _isJsInferredProject && info . isJavaScript ( ) ) {
@@ -2189,7 +2189,7 @@ export class InferredProject extends Project {
2189
2189
super . addRoot ( info ) ;
2190
2190
}
2191
2191
2192
- removeRoot ( info : ScriptInfo ) {
2192
+ override removeRoot ( info : ScriptInfo ) {
2193
2193
this . projectService . stopWatchingConfigFilesForInferredProjectRoot ( info ) ;
2194
2194
super . removeRoot ( info ) ;
2195
2195
if ( this . _isJsInferredProject && info . isJavaScript ( ) ) {
@@ -2200,7 +2200,7 @@ export class InferredProject extends Project {
2200
2200
}
2201
2201
2202
2202
/** @internal */
2203
- isOrphan ( ) {
2203
+ override isOrphan ( ) {
2204
2204
return ! this . hasRoots ( ) ;
2205
2205
}
2206
2206
@@ -2212,12 +2212,12 @@ export class InferredProject extends Project {
2212
2212
this . getRootScriptInfos ( ) . length === 1 ;
2213
2213
}
2214
2214
2215
- close ( ) {
2215
+ override close ( ) {
2216
2216
forEach ( this . getRootScriptInfos ( ) , info => this . projectService . stopWatchingConfigFilesForInferredProjectRoot ( info ) ) ;
2217
2217
super . close ( ) ;
2218
2218
}
2219
2219
2220
- getTypeAcquisition ( ) : TypeAcquisition {
2220
+ override getTypeAcquisition ( ) : TypeAcquisition {
2221
2221
return this . typeAcquisition || {
2222
2222
enable : allRootFilesAreJsOrDts ( this ) ,
2223
2223
include : ts . emptyArray ,
@@ -2241,12 +2241,12 @@ class AuxiliaryProject extends Project {
2241
2241
/*currentDirectory*/ undefined ) ;
2242
2242
}
2243
2243
2244
- isOrphan ( ) : boolean {
2244
+ override isOrphan ( ) : boolean {
2245
2245
return true ;
2246
2246
}
2247
2247
2248
2248
/** @internal */
2249
- scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2249
+ override scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2250
2250
// Invalidation will happen on-demand as part of updateGraph
2251
2251
return ;
2252
2252
}
@@ -2436,11 +2436,11 @@ export class AutoImportProviderProject extends Project {
2436
2436
return ! some ( this . rootFileNames ) ;
2437
2437
}
2438
2438
2439
- isOrphan ( ) {
2439
+ override isOrphan ( ) {
2440
2440
return true ;
2441
2441
}
2442
2442
2443
- updateGraph ( ) {
2443
+ override updateGraph ( ) {
2444
2444
let rootFileNames = this . rootFileNames ;
2445
2445
if ( ! rootFileNames ) {
2446
2446
rootFileNames = AutoImportProviderProject . getRootFileNames (
@@ -2461,62 +2461,62 @@ export class AutoImportProviderProject extends Project {
2461
2461
}
2462
2462
2463
2463
/** @internal */
2464
- scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2464
+ override scheduleInvalidateResolutionsOfFailedLookupLocations ( ) : void {
2465
2465
// Invalidation will happen on-demand as part of updateGraph
2466
2466
return ;
2467
2467
}
2468
2468
2469
- hasRoots ( ) {
2469
+ override hasRoots ( ) {
2470
2470
return ! ! this . rootFileNames ?. length ;
2471
2471
}
2472
2472
2473
- markAsDirty ( ) {
2473
+ override markAsDirty ( ) {
2474
2474
this . rootFileNames = undefined ;
2475
2475
super . markAsDirty ( ) ;
2476
2476
}
2477
2477
2478
- getScriptFileNames ( ) {
2478
+ override getScriptFileNames ( ) {
2479
2479
return this . rootFileNames || ts . emptyArray ;
2480
2480
}
2481
2481
2482
- getLanguageService ( ) : never {
2482
+ override getLanguageService ( ) : never {
2483
2483
throw new Error ( "AutoImportProviderProject language service should never be used. To get the program, use `project.getCurrentProgram()`." ) ;
2484
2484
}
2485
2485
2486
2486
/** @internal */
2487
- onAutoImportProviderSettingsChanged ( ) : never {
2487
+ override onAutoImportProviderSettingsChanged ( ) : never {
2488
2488
throw new Error ( "AutoImportProviderProject is an auto import provider; use `markAsDirty()` instead." ) ;
2489
2489
}
2490
2490
2491
2491
/** @internal */
2492
- onPackageJsonChange ( ) : never {
2492
+ override onPackageJsonChange ( ) : never {
2493
2493
throw new Error ( "package.json changes should be notified on an AutoImportProvider's host project" ) ;
2494
2494
}
2495
2495
2496
- getModuleResolutionHostForAutoImportProvider ( ) : never {
2496
+ override getModuleResolutionHostForAutoImportProvider ( ) : never {
2497
2497
throw new Error ( "AutoImportProviderProject cannot provide its own host; use `hostProject.getModuleResolutionHostForAutomImportProvider()` instead." ) ;
2498
2498
}
2499
2499
2500
- getProjectReferences ( ) {
2500
+ override getProjectReferences ( ) {
2501
2501
return this . hostProject . getProjectReferences ( ) ;
2502
2502
}
2503
2503
2504
2504
/** @internal */
2505
- includePackageJsonAutoImports ( ) {
2505
+ override includePackageJsonAutoImports ( ) {
2506
2506
return PackageJsonAutoImportPreference . Off ;
2507
2507
}
2508
2508
2509
- getTypeAcquisition ( ) : TypeAcquisition {
2509
+ override getTypeAcquisition ( ) : TypeAcquisition {
2510
2510
return { enable : false } ;
2511
2511
}
2512
2512
2513
2513
/** @internal */
2514
- getSymlinkCache ( ) {
2514
+ override getSymlinkCache ( ) {
2515
2515
return this . hostProject . getSymlinkCache ( ) ;
2516
2516
}
2517
2517
2518
2518
/** @internal */
2519
- getModuleResolutionCache ( ) {
2519
+ override getModuleResolutionCache ( ) {
2520
2520
return this . hostProject . getCurrentProgram ( ) ?. getModuleResolutionCache ( ) ;
2521
2521
}
2522
2522
}
@@ -2554,7 +2554,7 @@ export class ConfiguredProject extends Project {
2554
2554
projectOptions ?: ProjectOptions | true ;
2555
2555
2556
2556
/** @internal */
2557
- isInitialLoadPending : ( ) => boolean = returnTrue ;
2557
+ override isInitialLoadPending : ( ) => boolean = returnTrue ;
2558
2558
2559
2559
/** @internal */
2560
2560
sendLoadingProjectFinish = false ;
@@ -2593,12 +2593,12 @@ export class ConfiguredProject extends Project {
2593
2593
}
2594
2594
2595
2595
/** @internal */
2596
- useSourceOfProjectReferenceRedirect ( ) {
2596
+ override useSourceOfProjectReferenceRedirect ( ) {
2597
2597
return this . languageServiceEnabled ;
2598
2598
}
2599
2599
2600
2600
/** @internal */
2601
- getParsedCommandLine ( fileName : string ) {
2601
+ override getParsedCommandLine ( fileName : string ) {
2602
2602
const configFileName = asNormalizedPath ( normalizePath ( fileName ) ) ;
2603
2603
const canonicalConfigFilePath = asNormalizedPath ( this . projectService . toCanonicalFileName ( configFileName ) ) ;
2604
2604
// Ensure the config file existience info is cached
@@ -2630,7 +2630,7 @@ export class ConfiguredProject extends Project {
2630
2630
* If the project has reload from disk pending, it reloads (and then updates graph as part of that) instead of just updating the graph
2631
2631
* @returns : true if set of files in the project stays the same and false - otherwise.
2632
2632
*/
2633
- updateGraph ( ) : boolean {
2633
+ override updateGraph ( ) : boolean {
2634
2634
const isInitialLoad = this . isInitialLoadPending ( ) ;
2635
2635
this . isInitialLoadPending = returnFalse ;
2636
2636
const reloadLevel = this . pendingReload ;
@@ -2658,15 +2658,15 @@ export class ConfiguredProject extends Project {
2658
2658
}
2659
2659
2660
2660
/** @internal */
2661
- getCachedDirectoryStructureHost ( ) {
2661
+ override getCachedDirectoryStructureHost ( ) {
2662
2662
return this . directoryStructureHost as CachedDirectoryStructureHost ;
2663
2663
}
2664
2664
2665
2665
getConfigFilePath ( ) {
2666
2666
return asNormalizedPath ( this . getProjectName ( ) ) ;
2667
2667
}
2668
2668
2669
- getProjectReferences ( ) : readonly ProjectReference [ ] | undefined {
2669
+ override getProjectReferences ( ) : readonly ProjectReference [ ] | undefined {
2670
2670
return this . projectReferences ;
2671
2671
}
2672
2672
@@ -2682,7 +2682,7 @@ export class ConfiguredProject extends Project {
2682
2682
}
2683
2683
2684
2684
/** @internal */
2685
- getResolvedProjectReferenceToRedirect ( fileName : string ) : ResolvedProjectReference | undefined {
2685
+ override getResolvedProjectReferenceToRedirect ( fileName : string ) : ResolvedProjectReference | undefined {
2686
2686
const program = this . getCurrentProgram ( ) ;
2687
2687
return program && program . getResolvedProjectReferenceToRedirect ( fileName ) ;
2688
2688
}
@@ -2724,22 +2724,22 @@ export class ConfiguredProject extends Project {
2724
2724
/**
2725
2725
* Get the errors that dont have any file name associated
2726
2726
*/
2727
- getGlobalProjectErrors ( ) : readonly Diagnostic [ ] {
2727
+ override getGlobalProjectErrors ( ) : readonly Diagnostic [ ] {
2728
2728
return filter ( this . projectErrors , diagnostic => ! diagnostic . file ) || emptyArray ;
2729
2729
}
2730
2730
2731
2731
/**
2732
2732
* Get all the project errors
2733
2733
*/
2734
- getAllProjectErrors ( ) : readonly Diagnostic [ ] {
2734
+ override getAllProjectErrors ( ) : readonly Diagnostic [ ] {
2735
2735
return this . projectErrors || emptyArray ;
2736
2736
}
2737
2737
2738
- setProjectErrors ( projectErrors : Diagnostic [ ] ) {
2738
+ override setProjectErrors ( projectErrors : Diagnostic [ ] ) {
2739
2739
this . projectErrors = projectErrors ;
2740
2740
}
2741
2741
2742
- close ( ) {
2742
+ override close ( ) {
2743
2743
this . projectService . configFileExistenceInfoCache . forEach ( ( _configFileExistenceInfo , canonicalConfigFilePath ) =>
2744
2744
this . releaseParsedConfig ( canonicalConfigFilePath ) ) ;
2745
2745
this . projectErrors = undefined ;
@@ -2848,7 +2848,7 @@ export class ExternalProject extends Project {
2848
2848
documentRegistry : DocumentRegistry ,
2849
2849
compilerOptions : CompilerOptions ,
2850
2850
lastFileExceededProgramSize : string | undefined ,
2851
- public compileOnSaveEnabled : boolean ,
2851
+ public override compileOnSaveEnabled : boolean ,
2852
2852
projectFilePath ?: string ,
2853
2853
pluginConfigOverrides ?: Map < string , any > ,
2854
2854
watchOptions ?: WatchOptions ) {
@@ -2866,13 +2866,13 @@ export class ExternalProject extends Project {
2866
2866
this . enableGlobalPlugins ( this . getCompilerOptions ( ) , pluginConfigOverrides ) ;
2867
2867
}
2868
2868
2869
- updateGraph ( ) {
2869
+ override updateGraph ( ) {
2870
2870
const result = super . updateGraph ( ) ;
2871
2871
this . projectService . sendProjectTelemetry ( this ) ;
2872
2872
return result ;
2873
2873
}
2874
2874
2875
- getExcludedFiles ( ) {
2875
+ override getExcludedFiles ( ) {
2876
2876
return this . excludedFiles ;
2877
2877
}
2878
2878
}
0 commit comments