mirror of
https://github.com/bitburner-official/bitburner-src.git
synced 2026-04-22 09:13:07 +02:00
25 lines
655 B
TypeScript
25 lines
655 B
TypeScript
import type { ContentFilePath } from "../../Paths/ContentFile";
|
|
|
|
import * as monaco from "monaco-editor";
|
|
|
|
type ITextModel = monaco.editor.ITextModel;
|
|
|
|
// Holds all the data for a open script
|
|
export class OpenScript {
|
|
path: ContentFilePath;
|
|
code: string;
|
|
hostname: string;
|
|
lastPosition: monaco.Position;
|
|
model: ITextModel;
|
|
isTxt: boolean;
|
|
|
|
constructor(path: ContentFilePath, code: string, hostname: string, lastPosition: monaco.Position, model: ITextModel) {
|
|
this.path = path;
|
|
this.code = code;
|
|
this.hostname = hostname;
|
|
this.lastPosition = lastPosition;
|
|
this.model = model;
|
|
this.isTxt = path.endsWith(".txt");
|
|
}
|
|
}
|