src/vs/workbench/contrib/files/browser/editors/fileEditorInput.ts/FileEditorInput/toUntyped
class FileEditorInput:	override toUntyped(group: GroupIdentifier | undefined, context: UntypedEditorContext): ITextResourceEditorInput {
		const untypedInput: ITextResourceEditorInput & { options: ITextEditorOptions } = {
			resource: this.preferredResource,
			forceFile: true,
			options: {
				override: this.editorId
			}
		};

		if (context === UntypedEditorContext.Full) {
			untypedInput.encoding = this.getEncoding();
			untypedInput.mode = this.getMode();
			untypedInput.contents = (() => {
				const model = this.textFileService.files.get(this.resource);
				if (model && model.isDirty()) {
					return model.textEditorModel.getValue(); // only if dirty
				}

				return undefined;
			})();

			if (typeof group === 'number') {
				untypedInput.options.viewState = this.getViewStateFor(group);
			}
		}

		return untypedInput;
	}