@@ -61,7 +61,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
6161 return new EditorMemento ( this . getId ( ) , key , Object . create ( null ) , limit , editorGroupService ) ; // do not persist in storage as diff editors are never persisted
6262 }
6363
64- getTitle ( ) : string {
64+ getTitle ( ) : string | null {
6565 if ( this . input ) {
6666 return this . input . getName ( ) ;
6767 }
@@ -120,6 +120,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
120120
121121 // Readonly flag
122122 diffEditor . updateOptions ( { readOnly : resolvedDiffEditorModel . isReadonly ( ) } ) ;
123+ return undefined ;
123124 } , error => {
124125
125126 // In case we tried to open a file and the response indicates that this is not a text file, fallback to binary diff.
@@ -262,7 +263,7 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
262263 return super . loadTextEditorViewState ( resource ) as IDiffEditorViewState ; // overridden for text diff editor support
263264 }
264265
265- private saveTextDiffEditorViewState ( input : EditorInput ) : void {
266+ private saveTextDiffEditorViewState ( input : EditorInput | null ) : void {
266267 if ( ! ( input instanceof DiffEditorInput ) ) {
267268 return ; // only supported for diff editor inputs
268269 }
@@ -288,11 +289,11 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
288289 }
289290 }
290291
291- protected retrieveTextEditorViewState ( resource : URI ) : IDiffEditorViewState {
292+ protected retrieveTextEditorViewState ( resource : URI ) : IDiffEditorViewState | null {
292293 return this . retrieveTextDiffEditorViewState ( resource ) ; // overridden for text diff editor support
293294 }
294295
295- private retrieveTextDiffEditorViewState ( resource : URI ) : IDiffEditorViewState {
296+ private retrieveTextDiffEditorViewState ( resource : URI ) : IDiffEditorViewState | null {
296297 const control = this . getControl ( ) ;
297298 const model = control . getModel ( ) ;
298299 if ( ! model || ! model . modified || ! model . original ) {
@@ -311,9 +312,9 @@ export class TextDiffEditor extends BaseTextEditor implements ITextDiffEditor {
311312 return control . saveViewState ( ) ;
312313 }
313314
314- private toDiffEditorViewStateResource ( modelOrInput : IDiffEditorModel | DiffEditorInput ) : URI {
315- let original : URI ;
316- let modified : URI ;
315+ private toDiffEditorViewStateResource ( modelOrInput : IDiffEditorModel | DiffEditorInput ) : URI | null {
316+ let original : URI | null ;
317+ let modified : URI | null ;
317318
318319 if ( modelOrInput instanceof DiffEditorInput ) {
319320 original = modelOrInput . originalInput . getResource ( ) ;
0 commit comments