提交 f2d41726 编写于 作者: M Matt Bierner

Mark that preferredMode can be undefined

As part of the fix for #81574, I discovered that a large number of callers were already passing `undefined` for this value. This fix just marks the type as possibly undefined as well
上级 74e4847b
......@@ -80,7 +80,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
private contentEncoding: string; // encoding as reported from disk
private preferredEncoding: string; // encoding as chosen by the user
private preferredMode: string; // mode as chosen by the user
private preferredMode: string | undefined; // mode as chosen by the user
private versionId: number;
private bufferSavedVersionId: number;
......@@ -108,7 +108,7 @@ export class TextFileEditorModel extends BaseTextEditorModel implements ITextFil
constructor(
resource: URI,
preferredEncoding: string,
preferredMode: string,
preferredMode: string | undefined,
@INotificationService private readonly notificationService: INotificationService,
@IModeService modeService: IModeService,
@IModelService modelService: IModelService,
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册