File tree Expand file tree Collapse file tree
tests/baselines/reference/api Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -167,6 +167,8 @@ namespace ts.server {
167167
168168 private typingFiles : SortedReadonlyArray < string > ;
169169
170+ private readonly cancellationToken : ThrottledCancellationToken ;
171+
170172 public isNonTsProject ( ) {
171173 this . updateGraph ( ) ;
172174 return allFilesAreJsOrDts ( this ) ;
@@ -206,6 +208,7 @@ namespace ts.server {
206208 /*@internal */ public directoryStructureHost : DirectoryStructureHost ,
207209 rootDirectoryForResolution : string | undefined ) {
208210
211+ this . cancellationToken = new ThrottledCancellationToken ( this . projectService . cancellationToken , this . projectService . throttleWaitMilliseconds ) ;
209212 if ( ! this . compilerOptions ) {
210213 this . compilerOptions = getDefaultCompilerOptions ( ) ;
211214 this . compilerOptions . allowNonTsExtensions = true ;
@@ -294,7 +297,7 @@ namespace ts.server {
294297 }
295298
296299 getCancellationToken ( ) {
297- return this . projectService . cancellationToken ;
300+ return this . cancellationToken ;
298301 }
299302
300303 getCurrentDirectory ( ) : string {
Original file line number Diff line number Diff line change @@ -7091,6 +7091,7 @@ declare namespace ts.server {
70917091 */
70927092 private projectStateVersion ;
70937093 private typingFiles ;
7094+ private readonly cancellationToken ;
70947095 isNonTsProject ( ) : boolean ;
70957096 isJsOnlyProject ( ) : boolean ;
70967097 getCachedUnresolvedImportsPerFile_TestOnly ( ) : UnresolvedImportsMap ;
@@ -7103,7 +7104,7 @@ declare namespace ts.server {
71037104 getScriptKind ( fileName : string ) : ScriptKind ;
71047105 getScriptVersion ( filename : string ) : string ;
71057106 getScriptSnapshot ( filename : string ) : IScriptSnapshot ;
7106- getCancellationToken ( ) : HostCancellationToken ;
7107+ getCancellationToken ( ) : ThrottledCancellationToken ;
71077108 getCurrentDirectory ( ) : string ;
71087109 getDefaultLibFileName ( ) : string ;
71097110 useCaseSensitiveFileNames ( ) : boolean ;
You can’t perform that action at this time.
0 commit comments