src/vs/workbench/services/textfile/common/textFileEditorModelManager.ts/TextFileEditorModelManager/canDispose
class TextFileEditorModelManager:	canDispose(model: TextFileEditorModel): true | Promise<true> {

		// quick return if model already disposed or not dirty and not resolving
		if (
			model.isDisposed() ||
			(!this.mapResourceToPendingModelResolvers.has(model.resource) && !model.isDirty())
		) {
			return true;
		}

		// promise based return in all other cases
		return this.doCanDispose(model);
	}