UNPKG

@accordproject/concerto-util

Version:

Utilities for Concerto Modeling Language

38 lines (37 loc) 1 kB
import Writer = require('./writer'); /** * InMemoryWriter stores string representation of files in a map structure. * The Map key is the filename, and the value are its string contents. * * @private * @extends Writer * @see See {@link Writer} * @class * @memberof module:concerto-core */ declare class InMemoryWriter extends Writer { fileName: string; data: Map<string, string>; /** * Create a FileWriter. * */ constructor(); /** * Creates the filename which will be used for association with its string content. * * @param fileName - the name of the file. */ openFile(fileName: string): void; /** * Writes the contents of the buffer to the Map store. */ closeFile(): void; /** * Returns the content of the Map store. * * @return - a Map containing the string representation of files. (k,v) => (filename, file content). */ getFilesInMemory(): Map<string, string>; } export = InMemoryWriter;