src/vs/workbench/services/untitled/common/untitledTextEditorInput.ts/UntitledTextEditorInput/toUntyped
class UntitledTextEditorInput:	override toUntyped(group: GroupIdentifier | undefined, context: UntypedEditorContext): IUntitledTextResourceEditorInput {
		const untypedInput: IUntitledTextResourceEditorInput & { options: ITextEditorOptions } = {
			resource: this.model.hasAssociatedFilePath ? toLocalResource(this.model.resource, this.environmentService.remoteAuthority, this.pathService.defaultUriScheme) : undefined,
			forceUntitled: true,
			options: {
				override: this.editorId
			}
		};

		if (context === UntypedEditorContext.Full) {
			untypedInput.encoding = this.getEncoding();
			untypedInput.mode = this.getMode();
			untypedInput.contents = this.model.isDirty() ? this.model.textEditorModel?.getValue() : undefined;

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

		return untypedInput;
	}