/** * ------------------------------------------------------------------------------------------- * Copyright (c) Microsoft Corporation. All Rights Reserved. Licensed under the MIT License. * See License in the project root for license information. * ------------------------------------------------------------------------------------------- */ import { TextSerializationWriter } from "./textSerializationWriter.js"; export class TextSerializationWriterFactory { getValidContentType() { return "text/plain"; } getSerializationWriter(contentType) { if (!contentType) { throw new Error("content type cannot be undefined or empty"); } else if (this.getValidContentType() !== contentType) { throw new Error(`expected a ${this.getValidContentType()} content type`); } return new TextSerializationWriter(); } } //# sourceMappingURL=textSerializationWriterFactory.js.map