cm-spyglass
Version:
A Codemirror extension that provides syntax highlighting, linting, and autocompletion for Minecraft datapacks using SpyglassMC
21 lines (17 loc) • 428 B
JavaScript
import MemoryFileSystemEntry from "./MemoryFileSystemEntry.js";
export default class MemoryFileSystemFile extends MemoryFileSystemEntry {
/** @type {Uint8Array} */ content;
/**
* @param {Uint8Array} content
*/
constructor(content) {
super();
this.content = content;
}
/**
* @return {Promise<Uint8Array>}
*/
async getContent() {
return this.content;
}
}