Change:
<!-- Do Not Delete This! bugreporttemplate --<!-- Please read our Rules of Conduct: --<!-- Please search existing issues to avoid creating duplicates. --<!-- Also please test using the latest insiders build to make sure your issue has not already been fixed: --<!-- Use Help Report Issue to prefill these. --- VSCode Version: head OS Version: n/a This is a bug/inconsistency in the VSC codebase, which is currently obscured because of the specific way the code is written. This wouldn't really matter, but when using a build step that generates files for dependencies, the gets evaluated down to and compilation fails. And overall, it'd be nice for the types to align in a sensible way. Steps to Reproduce: , replace with Expected: compiles fine Actual: there are a number of errors like Property 'getFirstLineText' does not exist on type 'never'. The intersection 'this &amp; IResolvedTextFileEditorModel' was reduced to 'never' because property 'capabilities' has conflicting types in some (2339)TextFileEditorModelIWorkingCopyIResolvedTextFileEditorModelthis.isResolved() is known to be true) says capabilities should be a readonly 2. <!-- Launch with to check. --Does this issue occur when all extensions are disabled?: Yes
Since this seems to concern only you with your specific setup, wanna do a PR to fix this?
I would be more than happy to, but I'm not sure what approach you'd find (in)appropriate. could type in as a number instead of an enum (since checks against it are anyways done via bitwise-and) could change in to actually be 2 instead of 0 (though it seems like you also use 0 for this field in other places like , and somehow TSC doesn't care...) could add a enum value of 0 to , since it seems like that's how you use it. I'm leaning towards approach 3. What are your thoughts?
Yeah I think we can give 3. a try in a PR.

Discussion:
} public get capabilities(): WorkingCopyCapabilities { <del> return 0; </del> <ins> return WorkingCopyCapabilities.None; </ins> } public isDirty(): boolean {

this._register(this._workingCopyService.registerWorkingCopy(workingCopyAdapter)); } <del> capabilities = 0; </del> <ins> capabilities = WorkingCopyCapabilities.None; </ins> async backup(): Promise<IWorkingCopyBackup<NotebookDocumentBackupData>> { if (this._notebook.supportBackup) {

const workingCopyAdapter = new class implements IWorkingCopy { readonly resource = input.modelUri; get name() { return input.getName(); } <del> readonly capabilities = input.isUntitled() ? WorkingCopyCapabilities.Untitled : 0; </del> <ins> readonly capabilities = input.isUntitled() ? WorkingCopyCapabilities.Untitled : WorkingCopyCapabilities.None; </ins> readonly onDidChangeDirty = input.onDidChangeDirty; readonly onDidChangeContent = input.onDidChangeContent; isDirty(): boolean { return input.isDirty(); }

import { INotificationService } from 'vs/platform/notification/common/notification'; import { ILogService } from 'vs/platform/log/common/log'; import { basename } from 'vs/base/common/path'; <del> import { IWorkingCopyService, IWorkingCopyBackup } from 'vs/workbench/services/workingCopy/common/workingCopyService'; </del> <ins> import { IWorkingCopyService, IWorkingCopyBackup, WorkingCopyCapabilities } from 'vs/workbench/services/workingCopy/common/workingCopyService'; </ins> import { IFilesConfigurationService } from 'vs/workbench/services/filesConfiguration/common/filesConfigurationService'; import { ILabelService } from 'vs/platform/label/common/label'; import { CancellationTokenSource } from 'vs/base/common/cancellation';

//#endregion <del> readonly capabilities = 0; </del> <ins> readonly capabilities = WorkingCopyCapabilities.None; </ins> readonly name = basename(this.labelService.getUriLabel(this.resource));

export const enum WorkingCopyCapabilities { /** <ins> * Signals no specific capability for the working copy. */ None = 0, /** </ins> * Signals that the working copy requires * additional input when saving, e.g. an * associated path to save to.

*--------------------------------------------------------------------------------------------*/ import * as assert from 'assert'; <del> import { IWorkingCopy, IWorkingCopyBackup } from 'vs/workbench/services/workingCopy/common/workingCopyService'; </del> <ins> import { IWorkingCopy, IWorkingCopyBackup, WorkingCopyCapabilities } from 'vs/workbench/services/workingCopy/common/workingCopyService'; </ins> import { URI } from 'vs/base/common/uri'; import { Emitter } from 'vs/base/common/event'; import { Disposable } from 'vs/base/common/lifecycle';

private readonly _onDispose = this._register(new Emitter<void>()); readonly onDispose = this._onDispose.event; <del> readonly capabilities = 0; </del> <ins> readonly capabilities = WorkingCopyCapabilities.None; </ins> readonly name = basename(this.resource);